WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: JTaylor on January 21, 2026, 01:27:24 PM

Title: EditBox and Multiline edit box Suggestion
Post by: JTaylor on January 21, 2026, 01:27:24 PM
It would be appreciated if you implemented Ctrl+A (select all) for these type of controls.  Others might benefit as well but these two especially.

Thanks.


Jim
Title: Re: EditBox and Multiline edit box Suggestion
Post by: td on January 22, 2026, 08:04:43 AM
You can implement it yourself by associating a shortcut menu with the control of interest.
Title: Re: EditBox and Multiline edit box Suggestion
Post by: td on January 22, 2026, 08:43:02 AM
A rough example:
#DefineSubroutine ExProc(Ex_Handle,Ex_Event,Ex_Name,Ex_EventInfo,Ex_ChangeInfo)
   if Ex_Event ==  @deInit                                 
      DialogProcOptions(Ex_Handle,@deMiSelect,@TRUE)
   elseif Ex_Event ==  @deMiSelect ; ID "cmi1_MultiLineBox_1"  MultiLineBox_1 Select all\^A
      DialogControlState(Ex_Handle, "MultiLineBox_1", @dcsSetFocus, 0)
   endif                                            
   return(@retDefault)
#EndSubroutine                                              ;

ExFormat=`WWWDLGED,6.2`

ExCaption=`WIL Dialog Example`
ExX=758
ExY=218
ExWidth=278
ExHeight=293
ExNumControls=003
ExProcedure=`ExProc`
ExFont=`DEFAULT`
ExTextColor=`DEFAULT`
ExBackground=`DEFAULT,DEFAULT`
ExConfig=0
ExDPI=`216,10,20`

Ex001=`106,246,062,018,PUSHBUTTON,"PushButton_OK",DEFAULT,"OK",1,10,@csDefButton,DEFAULT,DEFAULT,DEFAULT`
Ex002=`012,009,251,214,MULTILINEBOX,"MultiLineBox_1",mlVariable1,"Type something here and press Ctrl+A",DEFAULT,20,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Ex003=`000,000,000,000,MENUITEM,"cmi1_MultiLineBox_1","MultiLineBox_1","Select all\^A",DEFAULT,10,DEFAULT`

ButtonPushed=Dialog("Ex")

exit
Title: Re: EditBox and Multiline edit box Suggestion
Post by: JTaylor on January 22, 2026, 08:51:29 AM
True but that goes for everything that WinBatch does but that is why people use programming languages, so they don't have to implement everything themselves :-)  Just seems easier to have it in place for all such controls rather than dealing with it on every single dialog and control.  Since things like Shift+Home/End work it seemed like a valid request.

Jim
Title: Re: EditBox and Multiline edit box Suggestion
Post by: kdmoyers on January 23, 2026, 10:37:02 AM
FWIW, I agree that Ctrl-A seems like a reasonable general key stroke function, like Home and End.

However, I also think that Tony's example code is fascinating.  I'm taking a copy to examine closely. Thanks, Tony!