Change Text Colour of Group
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Change Text Colour of Group
Hi All
I have two radio buttons:
- England
- Australia
These are grouped into a group titled "group_countries"
I would like to be able to set the text colour of the group but can't work out how to do this, I have tried:
set the textcolor of group "group_countries" to 0, 0, 0
does anybody know how to achieve this?
Many Thanks
I have two radio buttons:
- England
- Australia
These are grouped into a group titled "group_countries"
I would like to be able to set the text colour of the group but can't work out how to do this, I have tried:
set the textcolor of group "group_countries" to 0, 0, 0
does anybody know how to achieve this?
Many Thanks
-
- VIP Livecode Opensource Backer
- Posts: 9823
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Change Text Colour of Group
TextColor used for inline text in fields. For control labels try the foregroundColor.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Change Text Colour of Group
Hi Richard
Thank you very much for the input, I have tried this but unfortunately still no luck, I think the issue is more focussed around how to get the text colour of the radio buttons to change as a group.
For example if I use the following on an individual button it works
set the textcolor of me to 0, 0, 0
Whereas using the following to try to change the colour of all items in the group doesnt
set the textcolor of group "group_countries" to 0, 0, 0
(a little bit difficult to explain clearly)
Many Thanks
Thank you very much for the input, I have tried this but unfortunately still no luck, I think the issue is more focussed around how to get the text colour of the radio buttons to change as a group.
For example if I use the following on an individual button it works
set the textcolor of me to 0, 0, 0
Whereas using the following to try to change the colour of all items in the group doesnt
set the textcolor of group "group_countries" to 0, 0, 0
(a little bit difficult to explain clearly)
Many Thanks
Re: Change Text Colour of Group
I think what your looking for is something like this :
The above assumes you only have radio buttons in the group, but you can target specific controls more finely if needed.
Code: Select all
repeat with x=1 to the number of controls of group "rdoButtons"
set the foregroundColor of control x to "purple"
end repeat
Re: Change Text Colour of Group
Hi all,
groups do not have a "textcolor" property, you mean the "foegroundcolor".
Hint:
When setting this prop for the group all its children will in fact INHERIT this property, so all textcolor of all childrens will change!
UNLESS you already have set this property for some objects in the group manually (or by script) then this will overwrite the inheritance!
Best
Klaus
groups do not have a "textcolor" property, you mean the "foegroundcolor".
Hint:
When setting this prop for the group all its children will in fact INHERIT this property, so all textcolor of all childrens will change!
UNLESS you already have set this property for some objects in the group manually (or by script) then this will overwrite the inheritance!
Best
Klaus
Re: Change Text Colour of Group
Thanks all, the reason that is was not working is because I had already set the text size prior to establishing the script on the group, thus the group script did not take effect.
I started from scratch and the group script then worked.
Many Thanks
I started from scratch and the group script then worked.
Many Thanks