EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > XML Modification Help & Info

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 02-10-2016, 12:47 AM
aseop aseop is offline
A Forest Scavenger
Interface Author - Click to view interfaces
 
Join Date: Feb 2005
Server: Antonia Bayle
Posts: 18
Default Change Color of Button when pressed?

I was thinking it was possible to change the color of the text in a button when the button is pressed by defining a variable then assigning that variable to the Color attribute during OnPress...

Quote:
<button TextColor="#000000" PCOLOR="#FF0000" OnPress="TextColor=(PCOLOR)" >Hello</Button>
But this does not seem to work. Is there a way to do it?

Aseop
Reply With Quote
  #2  
Unread 02-10-2016, 01:08 PM
Darqwood's Avatar
Darqwood Darqwood is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Aug 2005
Posts: 847
Default

Depends on what you want to do with it. Buttons have a style that defines, among other things, the color of the text a) when you are not interacting with the button, b) when the mouse is hovering over the button, and c) when the button is disabled. If you look into the button styles you will see a PressedTextColor attribute but I have not used it successfully. MouseOverTextColor seems to override PressedTextColor.

If you want it to stay changed after the mouse moves away from it, you might look at the ToggleButton (which is really a checkbox that looks like a button.) Here you can use OnSet and OnUnset to change the TextColor. OnPress also works, but if you want it to behave like a normal button you will have to do something else, possibly use OnHoverOut to deactivate it and change back to the original color when the mouse exits the button.


.
Reply With Quote
  #3  
Unread 02-24-2016, 08:30 PM
aseop aseop is offline
A Forest Scavenger
Interface Author - Click to view interfaces
 
Join Date: Feb 2005
Server: Antonia Bayle
Posts: 18
Default

So I see what you are saying and changing the text color can be done, but you have to change the button style. I tried to use toggle buttons, but the default styles are underwhelming and I did not feel like creating a new one. In the end I added a check box beside the button and had the button check off the check box when pressed and change the color of the text to the right of the button which is essentially an expanded tooltip. For my purposes this works. Thanks again for the advice.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:32 AM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI