Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2334
AppStylist styleset per TabPage
posted
I am building some generic validation for my application and I use many tabs throughout the app. I was thinking that I would use AppStylist to create a StyleSet called "invalid" and assign that StyleSet to the invalid controls at runtime to show the user that certain controls are invalid. Pretty straight forward and works fairly well. The next step is I would like to make a TabPage caption forecolor red to show that a control on that tab is invalid. My first thought was to set the TabPage.StyleSet to "invalid" but TabPage does not have a styleset property.

Long story short, can I set stylesets to individual tabpages? If not, can I achieve this functionality some how using App styles? If not, is there an event that I can handle that will tell me when the StyleSet property of a control changes so I can manually set the forecolor of the tabpage it is on to red?

Thanks.
Parents
No Data
Reply
  • 44743
    posted

    To accomplish this you could create a resource in AppStylist which has the appearance for your error tab. At run-time, when you want to give the tab that appearance, you could set the tab's Appearance.StyleResourceName to that resource's name.

Children
No Data