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
285
Ultrabutton in Ultratree not displaying text
posted

Hi,

I'm using an UltraControlContainerEditor to embed an Ultrabutton in a cell of an Ultratree.  Everything works fine except that the button does not display the Text, or any appearance property for that matter.  The button looks like I want it in the designer, but when I run the application I only get a button with a default look and no text on it.

I'm using NetAdvantage 2011.2 for Windows forms.  Is this a bug or am I doing something wrong?

Thanks,

Cassio

 

 

 

 

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi Cassio,

    Regarding the button colors, my guess is that your button is using OS themes. The operating system themes are all-or-nothing, so if they are on, you can't change the colors individually. Try setting UseOsThemes to False on your UltraButton.

    Regarding the Text, my guess is that you have not set the RenderingControlPropertyName or EditingControlPropertyname on the UltraControlContainerEditor. That's okay, but if you don't set these, the UltraControlContainerEditor will fall back to using the Value property, if there is one, and then back to Text. There's no Value property on UltraButton, so it will likely be using Text. That means that the button's Text property will be set to the Value of the tree cell, which is likely empty. So your text is probably getting erased.

    The solution is to set the Value of the cell in the tree to the text you want the button to display and the button should pick that up. 

Children