Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loading Check Boxes into a column on a MSFLEXGRID 1

Status
Not open for further replies.

jcastill

Technical User
Jun 19, 2002
7
US
My problem occurs when I load a check box control array at run time.

The following code works if I preload the check box array at design time.
Included on the form are three check boxes which are a control array (chkbox(0), chkbox(1) and chkbox(2).

grdsales is a MSFLEXGRID control.

grdSales.Col = NewSchedOrderCol
For i = 1 To 2

grdSales.Row = i


chkBox(i).Move grdSales.Left +grdSales.CellLeft, _
grdSales.Top + grdSales.CellTop, _
grdSales.CellWidth - 8, _
grdSales.CellHeight - 8
chkBox(i).Visible = True

Next i

However if I were to include only chkbox(0) at design time and try to load the chkbox array one for each row on the grid it displays nothing.

grdSales.Col = NewSchedOrderCol
For i = 1 To NumFields Step 1
grdSales.Row = i
Load chkBox(i)
chkBox(i).Move grdSales.Left + grdSales.CellLeft, _
grdSales.Top + grdSales.CellTop, _
grdSales.CellWidth - 8, _
grdSales.CellHeight - 8
chkBox(i).Visible = True

Next i

TIA for any help on this!

John
 
Try adding:

chkBox(i).ZOrder

after the chkBox(i).Visible command, just to make sure it's not being covered up by the flexgrid.

Robert
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top