Sorry to reply on this old post but i can't see the 'New Post' button in these newsgroup (i'm signed in however as my boss bertcresens)
Question about UltraToolbarManager :
I've created a ComboxBox Tool in the Ribbon > I can even load a valueList to the control. It shows up, so far so good.
Now when I select from this combo while running the application , the combox doesn't show the selected item in the textfield of the combo, it's made empty again.
what am i doing wrong ?
Kind regards
Yves
Thanks Mike,
I copied the code from a sample somewhere, the sample probably just explained the technique and (prob) did not mention the full set of attributes on that item object. Anyway, problem solved.
regards
I wasn't suggesting setting SaveSettings to True, I just thought that might be the problem, but it looks like I misunderstood the problem anyway. The problem occurs because the value list items all have a DataValue of null, so the ComboBoxTool resolves it's value to null and then updates its display to reflect that value, so nothing is displayed. Set the DataValue as well as the DisplayText before adding the items to the value list.
included the wrong picture/attachment in last post, hereby again :
Hello,
I've set SaveSettings to True on the UltraToolbarManager, this has no effect on the behaviour.
Basically, this is what we coded : (see attached screenshot to clarify the behaviour)
btnScan.Enabled = False
btnStop.Enabled = False
sConfigFile = ""
miNumScanBoxes = 0
If sConfigFile = "" Then sConfigFile = Application.StartupPath + "\ScantoolSettings.xml"
LoadSettings(sConfigFile)
LoadPageSizes()
LoadFileTypes()
LoadDuplex()
If msLastScanBox.Length > 0 Then
SetScanboxRibbonTools()
End If
End Sub
Dim cmbTypes As Infragistics.Win.UltraWinToolbars.ComboBoxTool
Dim itm As Infragistics.Win.ValueListItem
Try
itm.DisplayText = "PDF - Portable Document Format"
valueListTypes.ValueListItems.Add(itm)
itm.DisplayText = "TIF - Tagged Image File"
If valueListTypes.ValueListItems.Count > 0 Then
cmbTypes.ValueList = valueListTypes
Else
'
MsgBox(ex.Message)
End Try
So when we run the app, the values are shown in the dropdown list, when we click an item, the value shows in the text area, but once we leave this control, the (selected) text inside the combo disappears, so nothing is selected.
What do we do ?
FYI: our version of the infragistics .NET reads 7.3.20073.38, is that the latest ?
How and when are you setting the selected item of the combo box? If you set it in the Load event and the selection is still getting cleared out, try overriding OnLoad in the Form. Call the base implementation first, then set your selected item in the combo box. Also, do you have SaveSettings enabled on the UltraToolbarsManager?