medbiller
Joined: 20 Dec 2007 Posts: 39 Location: Arroyo, PR
|
Posted: Thu Aug 09, 2012 3:16 pm Post subject: vTree textbox editor - Mouse & Keyboard Freezes |
|
|
I have a vTree with a TextBox editor in one cell. I use the following code to setup the editor:
Private Sub txtCellEditor_SetControlValue(sender As Object, e As Infralution.Controls.VirtualTree.CellEditorSetValueEventArgs) Handles...
maxChrs = 2
txtStr = vtPay.SelectedItem(pymPayPS.Name)
If Not vtPay.SelectedItem(pymPayEdit.Name) OrElse Not usrAllowEnterPay Then 'payment row is blocked or user has no access
e.Control.Enabled = False
End If
Dim txtCtrl As TextBox = DirectCast(e.Control, TextBox)
With txtCtrl
.ForeColor = focusForeColor
.BackColor = focusBackColor
.MaxLength = maxChrs
.CharacterCasing = chrCasing
.Text = txtStr
.SelectAll()
End With
The idea is to block editing of certain cells if the row is blocked (vtPay.SelectedItem(pymPayEdit.Name)=False) or if the user has no rights (usrAllowEnterPay=False). I also set the cells value into the editor & change fore/bacl colors, etc.
If I click into a blocked cell I can see the disabled TextBox with the right colors but if I type in a key the Mouse & keyboard freezes! The only way to get out of the frozen state is by pressing Alt-Tab & the application continues.
Using Vtree version 4.1.2, Windows 7, VS2010 (It happens if running compiled or from the IDE). Thanks _________________ Medical billing & records developer. |
|