Page 1 of 1
Set properties of Text Label of group
Posted: Tue Sep 08, 2015 6:17 pm
by kolia
Hello,
Some controls are grouped. I want to display the label of the group control and set text properties different from that of the controls that are Inside. Is there a way to do that?
Thank you
Nicolas
Re: Set properties of Text Label of group
Posted: Tue Sep 08, 2015 6:58 pm
by dunbarx
Hi.
If you group a number of, for example, buttons, the labels of those buttons will appear on the actual control. The group itself can have a label property, apart from its members, and can be set either from the inspector or under scripts control. It can have its own text properties. The individual controls can have their own text and style properties as well, within the group. Try a test group and see...
Craig Newman
Re: Set properties of Text Label of group
Posted: Tue Sep 08, 2015 7:23 pm
by kolia
Hi,
Well this is strange. When I set the group control label to bold, for instance, everything Inside goes to bold.
Nicolas
Re: Set properties of Text Label of group
Posted: Tue Sep 08, 2015 9:00 pm
by FourthWorld
Most visual attributes are inherited per the message path. So a control that has no textStyle property set will inherit it from its parent group if it's in a group, and if the group has no textStyle sent it will inherit from the card, then the stack, then the mainstack, then the home stack, then the engine defaults.
To override any attribute at any level, set the property in question to the desired value. In your case, set the textStyle of the buttons within the group to "plain".
Re: Set properties of Text Label of group
Posted: Tue Sep 08, 2015 10:22 pm
by dunbarx
Richard said:
Most visual attributes are inherited per the message path. So a control that has no textStyle property set will inherit it from its parent group
I mentioned this in my first post, but as a new user, you likely did not know that when you drag a control from the tools palette it comes "naked", that is, without explicit text properties (and others as well) pre-set. This is often not noticed until you run into a situation where everything seems insane, like you did. This is because if you do indeed create a new field and start typing, you will get text, and therefore it looks like there must be text properties already applied to that field.
There are not.
If you look at the text pane of a newly created field in the property inspector, you will find everything blank. Try it. At this point you can apply whatever properties you want to, and they would override any properties inherited from any enclosing (parent) object, like a group or a card.
Craig
Re: Set properties of Text Label of group
Posted: Wed Sep 09, 2015 6:01 am
by kolia
I see it becomes straightforward now. Thanks for the info.