Skip to content

Commit

Permalink
Try harder to select all the text from textbox1
Browse files Browse the repository at this point in the history
  • Loading branch information
kokoko3k committed May 30, 2016
1 parent 5c12b62 commit fc04b6b
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions .src/FMain.class
Expand Up @@ -1096,20 +1096,31 @@ Public Sub QuitMenu_Click()
End

Public Sub TextBox1_GotFocus()
'
' Dim o As Object
' Wait
' Wait 0.1
' Try textbox1.SelectAll
' textbox1.sele
' Wait 0.1
' textbox1.Select(0, String.Len(textbox1.text))
' Wait 0.1
' o = findSelectable(TextBox1)

select_all_override(textbox1)

Dim o As Object
Wait 0.1
Try textbox1.SelectAll
Wait
textbox1.Select(0, String.Len(textbox1.text))
Wait
o = findSelectable(TextBox1)
If o <> Null Then
Wait
o.selectall
Endif
End


Private Sub select_all_override(t As Textbox)
While t.Selection.text <> t.Text
textbox1.SelectAll
Wait 0.01
Wend
End



Private Function findSelectable(o As Object) As Object

Dim c As Integer = 0
Expand Down Expand Up @@ -1250,7 +1261,6 @@ End
Private Sub Form_LostFocus_workaround()
If global.unfocused_hide Then
Wait 0.1
Debug Desktop.ActiveWindow = fmain.Handle
If Not (Desktop.ActiveWindow = fmain.Handle) Then form_hide
Endif
End
Expand Down

0 comments on commit fc04b6b

Please sign in to comment.