Click to See Complete Forum and Search --> : Question about MS Flex Grid?
BJ
Nov 20th, 1999, 08:34 AM
I assumed the ms flex grid worked in the same mannor as the dbgrid control. When I use the dbgrid, I can click on it and type in it.
When I use the ms flex grid. When I click on it, I get get the dotted rectangle aroud it but I cannot type anything into it. Do I have to write code in got focus event or something.
Thanks
BJ
Aaron Young
Nov 20th, 1999, 09:38 AM
The MS FlexGrid is a ReadOnly Control, to be able to Write to it you will have to write routines to cater for that kind of functionality.
For example, when a Cell is clicked you could position a Text Control over that cell and allow the User to enter text into the Grid via the Textbox Control.
------------------
Aaron Young
Analyst Programmer
aarony@redwingsoftware.com
adyoung@win.bright.net
Lyla
Nov 20th, 1999, 12:14 PM
Go to DBGrid. It might be the best of the worst but it does the job and it's free :)
Good Luck.
Temjin
Jan 6th, 2000, 12:48 PM
** T1 is a text box, FG1 is a msflex grid **
Private Sub FG1_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case 113
Set_TextBox
End Select
End Sub
Private Sub Set_TextBox() 'put textbox over cell
With T1
.Top = FG1.Top + FG1.CellTop
.Left = FG1.Left + FG1.CellLeft
.Width = FG1.CellWidth
.Height = FG1.CellHeight
.Text = FG1
.Visible = True
.SelStart = Len(.Text)
.SetFocus
End With
End Sub
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.