Referenced By      Properties       Methods Send us your Feedback
SGControl Object

Name: SGControl
Description: SGControl is object that represents cell editor.
GUID: {1DF77B31-C735-11D2-8F0D-008048E27A77}

 Show Example
 Copy Code     Show Me

The following example shows how to create combo box in the first column. To try the example, place a SGGrid on a form. Paste the code into the Declarations section and press F5.

Private Sub Form_Load()
   Dim ctl As SGControl
   Dim vis As SGValueItems
   Dim i As Integer
   
   Set ctl = SGGrid1.Columns(1).Control
   'create combo box control
   ctl.Type = sgCellDropDown
   'set size of combo list
   ctl.Height = 2200
   ctl.Width = 2200
   ctl.PopupAlignment = sgPopupLeft
   ctl.PopupStyle.BackColor = QBColor(14)
   ctl.PopupStyle.Font.Size = 15
   ctl.PopupStyle.Font.Name = "Arial"
   ctl.SortOrder = sgNoSorting
   'set value items
   Set vis = SGGrid1.Columns(1).ValueItems
   
   For i = 1 To 50
      vis.Add i, "Item " & i, Me.Icon
   Next
   
   Set vis = Nothing
   Set ctl = Nothing

End Sub


Back to topic

Referenced By

SGColumn.Control