Button Border
Moderators: LCNeil, heatherlaine, kevinmiller, elanorb
Button Border
Hi there,
I'm using LiveCode 6.6.0 with Mac OS X.
I try to do a simple task. I want to set the borderColor of a button. However the borderColor has the same color as the text color. The Border Color that is set in Colors & Patterns is not taken. I can also not set it in the code "set the borderColor of me to "black"".
I have spent hours on this without finding a solution. Everything works fine with a rectangle. Just with a button it's not working. Is this be a bug? Or am I doing something wrong?
Kind regards,
Chris
I'm using LiveCode 6.6.0 with Mac OS X.
I try to do a simple task. I want to set the borderColor of a button. However the borderColor has the same color as the text color. The Border Color that is set in Colors & Patterns is not taken. I can also not set it in the code "set the borderColor of me to "black"".
I have spent hours on this without finding a solution. Everything works fine with a rectangle. Just with a button it's not working. Is this be a bug? Or am I doing something wrong?
Kind regards,
Chris
Re: Button Border
Hi Chris,
A border color will not be applied to a button if its "threeD" property is set to true. The following is taken from the LiveCode borderColor dictionary entry-
Kind Regards,
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
LiveCode – Realize fast, compile-free coding
--
A border color will not be applied to a button if its "threeD" property is set to true. The following is taken from the LiveCode borderColor dictionary entry-
I hope this is of some assistance* The borderColor of a button determines the color of the border around the button. If the button's style is "checkbox" or "radioButton", the borderColor has no effect. If the button is a button menu, the borderColor has no effect unless the button's menuMode property is set to "comboBox" or "popup". If the button's threeD property is set to true, the borderColor has no effect regardless of the button's style.
Kind Regards,
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
LiveCode – Realize fast, compile-free coding
--
Re: Button Border
Hi Neil,
I have been reading about borderColor in the dictionary. However disabling ThreeD didn't solve my issue.
I have found out that the borderColor issue does only occur when I choose the Rounded Rectangle with Drop Shadow. When I choose Square Button for example then your mentioned behaviour is working. What is the special thing with the Rounded Rectangle?
Also what I don't quite get is "Hilited Text" in "Colors & Patterns". I would assume that when I choose a color for "Hilited Text" I choose the color of the label of the button. Instead it changes the hilite color of the background of the button. I somehow seem to have difficulties to understand the logic behind the buttons.
How can I change the color of the label of the button over property inspector?
I have attached a test stack.
Kind regards,
Chris
I have been reading about borderColor in the dictionary. However disabling ThreeD didn't solve my issue.
I have found out that the borderColor issue does only occur when I choose the Rounded Rectangle with Drop Shadow. When I choose Square Button for example then your mentioned behaviour is working. What is the special thing with the Rounded Rectangle?
Also what I don't quite get is "Hilited Text" in "Colors & Patterns". I would assume that when I choose a color for "Hilited Text" I choose the color of the label of the button. Instead it changes the hilite color of the background of the button. I somehow seem to have difficulties to understand the logic behind the buttons.
How can I change the color of the label of the button over property inspector?
I have attached a test stack.
Kind regards,
Chris
- Attachments
-
- buttontest.livecode.zip
- (3.9 KiB) Downloaded 353 times
Re: Button Border
Hi Chris,
Yes that would indeed explain why the borderColor was not working for you. This seems to be the way LiveCode has implemented this property for rounded rectangles buttons for some time (possibly from the beginning) as I can go as far back as LiveCode 5.5.3 and it is present.
WIth that being said, there is a great workaround discussed in this forum post and it involves using graphic effects-
http://ftp.runrev.com/forums/viewtopic. ... 22&p=78904
The hilited text property can be confusing as it relates to the full hilite color of a button (as you have mentioned). A method to change the text color when a button is pressed is via script e.g.
Kind Regards,
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
LiveCode – Realize fast, compile-free coding
--
Yes that would indeed explain why the borderColor was not working for you. This seems to be the way LiveCode has implemented this property for rounded rectangles buttons for some time (possibly from the beginning) as I can go as far back as LiveCode 5.5.3 and it is present.
WIth that being said, there is a great workaround discussed in this forum post and it involves using graphic effects-
http://ftp.runrev.com/forums/viewtopic. ... 22&p=78904
The hilited text property can be confusing as it relates to the full hilite color of a button (as you have mentioned). A method to change the text color when a button is pressed is via script e.g.
Code: Select all
on mouseDown
set the foregroundColor of me to "white"
end mouseDown
on mouseUp
set the foregroundColor of me to "black"
end mouseUP
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
LiveCode – Realize fast, compile-free coding
--
Re: Button Border
Hi Neil,
Ok, understand. Just a little rough around the edges as one would expect similar functionality with all the buttons. But I assume this will be cleaned up somewhen when you're not developing 3 streams in parallel
The workaround is neat. This guy must have had LiveCode in his Cornflakes
Works.
Ok, understand. Just a little rough around the edges as one would expect similar functionality with all the buttons. But I assume this will be cleaned up somewhen when you're not developing 3 streams in parallel
The workaround is neat. This guy must have had LiveCode in his Cornflakes
Works.
Re: Button Border
Hi Chris,
Kind regards
Bernd
since you are located in Switzerland: to be more exact it was in my muesli...This guy must have had LiveCode in his Cornflakes
Kind regards
Bernd
Re: Button Border
Hi Bernd,
I knew it must have been a Birchermüesli with a pinch of LiveCode. How else would you have these fantastic ideas
I'm sure you're smuggling tons of this stuff over the border.
Greets to Bochum.
Kind regards,
Chris
I knew it must have been a Birchermüesli with a pinch of LiveCode. How else would you have these fantastic ideas
I'm sure you're smuggling tons of this stuff over the border.
Greets to Bochum.
Kind regards,
Chris