Hi,
not sure what I am doing wrong, but I can't get the style I want. I recently replaced a textbox I had with the infragistics one but I want to keep the look the same. The style is intially flat looking and it does change as I focus the textbox to the one I actually set. I don't understand why it is not always that one.
in the designer I see the textbox raised the same way I see it when focused, but how do I get rid of the flat appearance when not focused?
Me.txtText.BorderStyle = Infragistics.Win.UIElementBorderStyle.Raised
Me.txtText.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Office2000
Me.txtText.UseAppStyling = False
Me.txtText.UseFlatMode = Infragistics.Win.DefaultableBoolean.[False]
Me.txtText.UseOsThemes = Infragistics.Win.DefaultableBoolean.[True]
thanks,
mk
thanks Mike for the help, that was it!
Try this:
Don't set the DisplayStyle to Office2000 (since this is what's giving you the flat look you don't want). Set the DisplayStyle to Standard (or just don't set it at all, since that's the default).
Then set the BorderStyle to Inset.
well this is all there is, nothing special about it. With those settings I get the control flat looking and the UseOsThemes setting does not really make a difference, I get the same behavior in both cases. I am using the 13.2 version on windows7.
I tried it again and the result is the same: flat looking control, it gets the wished style as soon as I focus on it.
'
'UltraTextEditor1
Me.UltraTextEditor1.BorderStyle = Infragistics.Win.UIElementBorderStyle.Raised
Me.UltraTextEditor1.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Office2000
Me.UltraTextEditor1.Location = New System.Drawing.Point(158, 213)
Me.UltraTextEditor1.Name = "UltraTextEditor1"
Me.UltraTextEditor1.Size = New System.Drawing.Size(100, 21)
Me.UltraTextEditor1.TabIndex = 14
Me.UltraTextEditor1.UseAppStyling = False
Me.UltraTextEditor1.UseFlatMode = Infragistics.Win.DefaultableBoolean.[False]
Me.UltraTextEditor1.UseOsThemes = Infragistics.Win.DefaultableBoolean.[False]
There isn't enough information here to determine why you're getting different looks depending on whether the control is focused.
Setting UseOsThemes to true, however, would certainly explain the control appearing with flat borders, assuming you're running an OS more recent than Windows2000, since that setting tells the control to use the OS theming to render itself.