WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: JTaylor on June 24, 2024, 07:53:29 AM

Title: Control Type
Post by: JTaylor on June 24, 2024, 07:53:29 AM
Is there an direct way to retrieve the Control Type.  ie. PUSHBUTTON, EDITBOX, etc.   Such as a DialogControlGet() option?  If not, would like to request one.  Not sure why I haven't asked for this before (maybe I have?)???  I have need of it on a regular basis.  I know I can get it from the DialogControl variables but being able to request the value without having to loop through all the variables would be helpful.  Hoping I have just overlooked something.

Jim
Title: Re: Control Type
Post by: td on June 24, 2024, 09:08:04 AM
Currently, it can't be done using DialogControlGet. The function has run out of 32-bit request bits. Adding more requires changing the implementation a bit. Not say that it can't or won't be done but that is not as trivial as it seems on the surface.
Title: Re: Control Type
Post by: JTaylor on June 24, 2024, 09:20:12 AM
Okay. 

Thanks.

Jim
Title: Re: Control Type
Post by: kdmoyers on June 26, 2024, 01:31:58 PM
When I had this issue, I resolved to standardize the control names as I create the dialog, and then infer the type from that.  So, in my case, the first letter of the name indicates the type.
It actually worked fairly well.
Title: Re: Control Type
Post by: JTaylor on June 26, 2024, 02:18:56 PM
Yes.  My WB_RAD app does that for me when it generates Control Names and is what I have used previously but I am working on things for other people to use so can't assume.  If I know the Dialog Variable Name, I can extract the info from the loaded variables.  Now if everyone was using WB_RAD like they should... ;-)

Would be handy having that as an option but I understand the problem Tony has run into.

Jim