To programmatically create a selected C1WebToolBarItem in code, cast the item to the C1WebLinkItem type and set the Selected property to True like the following:
C1WebToolBar1.Groups(0).AllowSelectItem = True
CType(C1WebToolBar1.Groups(0).Items(1), C1.Web.Command.C1WebLinkItem).Selected = True
· C#
C1WebToolBar1.Groups[0].AllowSelectItem = true;
((C1.Web.Command.C1WebLinkItem)C1WebToolBar1.Groups[0].Items[1]).Selected = true;
· Delphi
C1WebToolBar1.Groups[0].AllowSelectItem := true;
((C1.Web.Command.C1WebLinkItem)C1WebToolBar1.Groups[0].Items[1]).Selected := true;
The following image shows how the second C1WebToolBarItem appears selected when its Selected property is set to True.
Send comments about this topic to ComponentOne. Copyright © ComponentOne LLC. All rights reserved. |