-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to set webbutton background when the MouseEnter by xml . #682
Comments
mouse hover |
You can use <decoration states="hover">
<ColorBackground color="black"/>
</decoration> You can also use any other background implementation there, for example You can also find the comprehensive list of states in Here is the |
i add hover bg. when mouse hover button ,then press button the press color not effect |
Order of So in this case I recommend to make a fully custom style for your button (you can copy-paste it from default style) and simply add Here is an example: <style type="button" id="custom" padding="2,4,2,4">
<component>
<foreground>black</foreground>
</component>
<painter>
<decorations overwrite="true">
<decoration>
<WebShape round="3" />
<WebShadow type="outer" width="2" />
<LineBorder color="170,170,170" />
<GradientBackground>
<color>white</color>
<color>223,223,223</color>
</GradientBackground>
<ButtonLayout>
<ButtonIcon constraints="icon" />
<ButtonText constraints="text" />
</ButtonLayout>
</decoration>
<decoration states="hover">
<ColorBackground color="black"/>
</decoration>
<decoration states="focused">
<LineBorder color="85,130,190" />
</decoration>
<decoration states="pressed">
<WebShadow type="outer" opacity="0" />
<WebShadow type="inner" width="6" />
<ColorBackground color="210,210,210" />
</decoration>
<decoration states="disabled">
<WebShadow type="outer" opacity="0" />
<LineBorder color="lightGray" />
<ButtonLayout>
<ButtonText color="120,120,120" ignoreCustomColor="true" />
</ButtonLayout>
</decoration>
</decorations>
</painter>
</style> |
i want to add hover color and select color in table by xml.how to add it |
|
Do you mean hover and select for cells? Hover isn't tracked for separate cells right now, so that will have to be implemented from the ground up in the component itself & it's painter. Can't really give any advice on this right now since this requires some investigation on how to properly implement it. I've made a separate issue for the improvement for future updates: #690 As for cell selection - you can change it by modifying the |
i just mean how to add the hover color fo the whole row |
It's the same as for cells - currently you cannot, because hover isn't tracked for separate rows/columns/cells. |
The text was updated successfully, but these errors were encountered: