The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Selecting Edit Field Text upon Click
#1
I can't figure this out on my own but I looked many places in forum. When user clicks on edit field, any text in there should become selected, so the user can make choice of just typing to replace or copy, paste etc. This is like behaviour when clicking on url field in IE. I can't seem to make this work in my dialogs. Why did this not work? What is best way?
Thanks so much!!!
S

Function Dialog8
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
out

;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 223 135 "Dialog"
;3 Edit 0x54030080 0x200 24 14 96 14 ""
;4 Edit 0x54030080 0x200 24 38 96 14 ""
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2030605 "" "" "" ""

str controls = "3 4"
str e3 e4
e3 = "hello"
e4 = "goodbye"
if(!ShowDialog("Dialog8" &Dialog8 &controls)) ret

ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_CTLCOLOREDIT    
,,ifk((1))
,,,out GetDlgCtrlID(child(mouse))
,,,_i = GetDlgCtrlID(child(mouse))
,,,SendMessage _i EM_SETSEL 0 -1
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)