[SOLVED] how can I change button hover forecolor?

Answered
0
0

Hello,

I’m talking about editing theme.

I’m using as buttonHighlight a dark color, and I don’t know how to change button hover forecolor to a light color.

  • You must to post comments
Best Answer
1
1

Adrian,

you can use the ThemeBuilder to either change an existing Theme or create a custom Theme or create a Theme Mixin.

Just add a property textColor to the Hovered state of a Button:

highlighttextcolor

Or you can add this color in your code:

Application.Theme.Appearances.button.states.hovered.properties.textColor = System.Drawing.Color.Red;

Best regards
Frank

  • Carlos Lino
    Hey Frank, where do you get the code above? In the theme builder does not show. Thanks
  • Frank (ITG)
    Hi Carlos, what code? The line with Application.Theme.Apperances…. ? You can deduct it from the tree structure. Best regards, Frank
  • Carlos Lino
    I tried to deduct it for Application.Theme.Appearances.tabview.page.button.Label.states.Horizontal.properties.marginRight = 60; to set more margin to the label of the tabpage but no success. Can you help me with this, please?
  • Frank (ITG)
    Carlos, please try this: Application.Theme.Appearances.tabview.components[“page”].components[“button”].components[“label”].states[“horizontal”].properties.margin = new Padding ( 0, 0, 60, 5 ); Best regards, Frank
  • Carlos Lino
    That worked! Many thanks Frank. One last thing…..is this possible to make it from the properties of the control in design mode? I see some things you cannot do from the properties so I had to use this last resource editing the theme in runtime, am I right? Thanks again.
  • You must to post comments
1
0

Also use this guide:

https://wisej.com/docs/2.1/html/ThemeBuilder.htm

Under Structure https://wisej.com/docs/2.1/html/ThemeStructure.htm You will find the available styles (they are all documented since they are limited to the available decorators that transform the style values to CSS), under properties you will find the most common properties. Properties in Wisej and the theme are unlimited and dynamic since they are themeable javascript properties.

  • You must to post comments
0
0

Hi Adrian,

the theme settings are stored in a dynamic object so unfortunately there is no IntelliSense help available

A good approach is to use the ThemeBuilder and the Preview window to mark the element you are going
to theme. (You can also use the Browse button and theme your existing application live).

Then you can switch to the Editor window and it should have synched to the theme definition.
Here you can see the structure and start building your code from there.

It may require a bit of training to find the right spots and definitions but I´m sure you´ll love the
flexibility and power of Wisej´s theming system.

If you are stuck, just ask for help here and I am sure you will find help quickly.

Best regards
Frank

  • You must to post comments
0
0

Thank you, that’s perfect.

Regarding that “pseudo-problem”, one of the most powerful part of Visual Studio is context help. What’s not so good right now with wisej. For example, in my case:

  1. After Application.Theme.Appearances. there is nothing displayed in Visual Studio (only ToJSON), and I found nowhere in documentation your code. You (your team) could at least publish some samples.
  2. In Theme Builder I was not able to understand that I can add new properties (textColor is not there by default, I added it after seeing your answer). My bad, but probably some words added in documentation could help.

Nevertheless, your help here in forum is excellent and I really appreciate that!

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.