A
Alastair MacFarlane
Dear All,
I have added a Date Time Picker date control to a project (in fact it is
displayed when I select a specific column in a datagrid) and I would like it
to expand when it receives the focus. The code below works for a ComboBox
(substituting the hWnd value) but it does not work work with the Date Time
Picker control. Does anyone have any ideas?
Private Sub DTPicker1_GotFocus()
Call SendMessage(DTPicker1.hWnd, CB_SHOWDROPDOWN, True, 0&)
End Sub
The event gets fired as expected but the code does not have the desired
effect.
Thanks again.
Alastair MacFarlane
p.s The code that positions the DTPicker is as follows:
Dim gridCol As MSDataGridLib.Column
Set gridCol = grdDataGrid.Columns(grdDataGrid.Col)
DTPicker1.Move grdDataGrid.Left + gridCol.Left, grdDataGrid.Top +
grdDataGrid.RowTop(grdDataGrid.Row), gridCol.Width
DTPicker1.ZOrder
DTPicker1.Visible = True
DTPicker1.SetFocus
DTPicker1.Value = gridCol.Text
I have added a Date Time Picker date control to a project (in fact it is
displayed when I select a specific column in a datagrid) and I would like it
to expand when it receives the focus. The code below works for a ComboBox
(substituting the hWnd value) but it does not work work with the Date Time
Picker control. Does anyone have any ideas?
Private Sub DTPicker1_GotFocus()
Call SendMessage(DTPicker1.hWnd, CB_SHOWDROPDOWN, True, 0&)
End Sub
The event gets fired as expected but the code does not have the desired
effect.
Thanks again.
Alastair MacFarlane
p.s The code that positions the DTPicker is as follows:
Dim gridCol As MSDataGridLib.Column
Set gridCol = grdDataGrid.Columns(grdDataGrid.Col)
DTPicker1.Move grdDataGrid.Left + gridCol.Left, grdDataGrid.Top +
grdDataGrid.RowTop(grdDataGrid.Row), gridCol.Width
DTPicker1.ZOrder
DTPicker1.Visible = True
DTPicker1.SetFocus
DTPicker1.Value = gridCol.Text