pang1703
08-02-2004, 02:28 AM
hi all,
i would like to put two option buttons into same row in a grid or listview or listbox?
how to do that? which vb control is more powerful to have two option buttons?
thanks in advanced.
pang1703
08-02-2004, 07:27 PM
hi,
how about checkboxes? can i put two checkboxes in same row but different column of a grid?
thanks
Gruff
08-02-2004, 07:47 PM
hi all,
i would like to put two option buttons into same row in a grid or listview or listbox?
how to do that? which vb control is more powerful to have two option buttons?
thanks in advanced.
Look at this great resource on the forum by Mr flex himself: Flyguy.
Way down the thread is a post entitled "Faking Checkboxes"
Also the last two posts in the thread talk about checkboxes.
Flexgrid functions (http://www.xtremevbtalk.com/showthread.php?t=35110&highlight=Flexgrid)
Perhaps it will give you some ideas.
~Tom
pang1703
08-03-2004, 06:35 PM
how to put two option button into msflexgrid?
Did you even read the link that Gruff gave you. The fourth post from the bottom on first page entitled "Fake checkboxes" will show you how to put a checkbox any where in a flex grid.
Zahartor
08-03-2004, 07:05 PM
in the tutorial of FlyGuy it's write how to put one checkBox but this is the version for 2 checkbox... the only problem is that I'm not able to check the checkbox :-(
Option Explicit
Private Const fgChecked As Byte = 253
Private Const fgUnChecked As Byte = 168
Private Sub Form_Load()
Dim lRow As Long
Dim lHeight As Long
With MSFlexGrid1
lHeight = .RowHeight(0)
.Cols = 4
.Rows = 25
.ColAlignment(2) = flexAlignCenterCenter
.Col = 2
For lRow = .FixedRows To .Rows - 1
.Row = lRow
.Font.Size = 12
.Font.Bold = False
.Font = "Wingdings"
.Text = Chr$(fgUnChecked) & Chr$(fgUnChecked)
Next lRow
.RowHeight(-1) = lHeight
End With
End Sub
Private Sub MSFlexGrid1_Click()
With MSFlexGrid1
If .Col = 2 Then
If .Text = Chr$(fgUnChecked) Then
.Text = Chr$(fgChecked)
ElseIf .Text = Chr$(fgChecked) Then
.Text = Chr$(fgUnChecked)
End If
End If
End With
End Sub