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
725
BackColor on a Node Buton
posted

Might not be the best/right place for this question but here goes...

I have successfully added a button on the nodes in my tree & using some other magic from here have been able to create a "click" event for the button separate from the node itself to pop up a Node specific Info dialog.

What I am trying to do now is be able to set the back color of the button based on some state information of the node. Only problem is I can't get the button to actually change colors.

Here is a snip of what I'm doing. Right now I'm just trying to force one color to see when it works.

_caption is a String I build earlier in the routine

Dim Node As UltraTreeNode = New UltraTreeNode(_caption)

' Create Button
Dim _editorbutton As New Infragistics.Win.UltraWinEditors.EditorButton("InfoButton")
'_editorbutton.Appearance.Image = My.Resources.information
_editorbutton.Appearance.ForeColor = Color.Red
_editorbutton.Appearance.BackColor = Color.Blue
_editorbutton.Text = "H"

' Create EditorControl & add button
Dim _customeditior As New Infragistics.Win.EditorWithText
_customeditior.ButtonsLeft.Add(_editorbutton)

' Set control as Node base editor
Node.Override.Editor = _customeditior

I thought that maybe something with the image was causing issues so I commented that line out but it didn't make a difference.

The Text and ForeColor are changing as expected, just not the back color.

I am obviously in over my head so any advice & guidance would be appreciated.

Thanks

Steve