Thanks Erel, I hadn't noticed this - I see it now.At the end of SelectionChanged event the focus returns to the table. So if we want to move the focus to the textbox we need to use the timer.
This took me a while to see. However there seems to be a bug/feature in that clicking on a partially exposed row 11 (last row) actually positions the text box on row 12 (non-existent) rather than on top of the cell on row 11 and clicking on a partially exposed row 11 cell 3 offsets the editbox to the right as well, both somewhat spoiling the effect. Additional tests needed perhaps?This rearrangement occurs after MouseMove event.
Sub CalcColumnPosition (colNumber)
x = editTable.x
[B]o.Value = obj.RunMethod3("HitTest",x,"System.Int32",editTable.y,"System.Int32")
If o.GetProperty("Type") = "None" Then editTable.y = editTable.y - editTable.rowHeight
[/B]...
This code will disable the Scrollbars from user control, however the table will still re-arrange itself if clicked on a partially hidden cell. oh and ov are Door library Objects.How to catch the scroll bar properties on mousedown event on table?
oh.New1(false)
ov.New1(false)
obj.FromControl(TableName)
o.Value = obj.GetProperty("Controls")
oh.Value = o.GetProperty2("Item",0) ' 0 = hscrollbar, 1 = vscrollbar
ov.Value = o.GetProperty2("Item",1) ' 0 = hscrollbar, 1 = vscrollbar
oh.SetProperty("Enabled", false)
ov.SetProperty("Enabled", false)
[I]txtEdit.SelectionLength = StrLength(txtEdit.Text)[/I]
[B]oh.SetProperty("Enabled", false)
ov.SetProperty("Enabled", false[/B])
[I]txtEdit.Focus[/I]
Sub eventScrollH_NewEvent
btnAccept_Click
End Sub
Sub eventScrollV_NewEvent
btnAccept_Click
End Sub
Sub eventScrollH_NewEvent
pnlEdit.Visible = False
End Sub
Sub eventScrollV_NewEvent
pnlEdit.Visible = False
End Sub
(line 36)
cmd.CommandText = "UPDATE inventario SET conta = "& value & " WHERE IDPK = "& chave
cmd.ExecuteNonQuery
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?