2008年8月17日星期日

DataGrid show DataCombo for vb

DataGrid1_MouseDown
Dim col As MSDataGridLib.Column
Set col = DataGrid1.Columns(DataGrid1.col)
If col.Caption = "MS" And DataGrid1.CurrentCellVisible Then
DataCombo1.Left = DataGrid1.Left + col.Left + 2 * Screen.TwipsPerPixelX
DataCombo1.Top = DataGrid1.Top + DataGrid1.RowTop(DataGrid1.Row) + 2 * Screen.TwipsPerPixelX
DataCombo1.Width = col.Width - 2 * Screen.TwipsPerPixelX
DataCombo1.Text = col.Text
DataCombo1.Visible = True
DataCombo1.SetFocus
DataCombo1.ZOrder
Else
DataCombo1.Visible = False
End If

没有评论: