GUI reference documentation

Learning APL or new to Dyalog? Ask "silly" questions here, without fear...

GUI reference documentation

Postby augustk on Wed Jun 05, 2019 1:15 pm

Where can I find reference documentation of the GUI library that comes with Dyalog APL. More specifically, I would like to know if there is a way to set a character limit for an Edit control, so in this case I would like to see a list of all attributes applicable to Edit controls.
augustk
 
Posts: 27
Joined: Tue Feb 05, 2019 11:54 am

Re: GUI reference documentation

Postby augustk on Wed Jun 05, 2019 2:01 pm

I found the answer myself: In the F1 help window, select the Index tab and search for "Properties". When a widget type is selected in the list under Properties, e.g. Edit, all applicable properties are listed on the right.
augustk
 
Posts: 27
Joined: Tue Feb 05, 2019 11:54 am

Re: GUI reference documentation

Postby Fiona|Dyalog on Thu Jun 06, 2019 8:20 am

Hi. The information you're looking for is in the Dyalog for Microsoft Windows Object Reference Guide (see http://docs.dyalog.com/17.0/Dyalog%20for%20Microsoft%20Windows%20Object%20Reference%20Guide.pdf) – if you go to the Documentation Centre (https://www.dyalog.com/documentation_170.htm) there's a list of all the documents that are available with a brief summary of each one so that you can see what it's about and a link to its PDF. Offline versions of these documents can also be found from your Dyalog Session by selecting Help > Documentation Centre in the menu bar (the online versions of the documents get updated during the lifecycle of the release, so these are likely to be more up-to-date than the offline versions).
User avatar
Fiona|Dyalog
 
Posts: 68
Joined: Mon Apr 22, 2013 12:59 pm

Re: GUI reference documentation

Postby Vince|Dyalog on Thu Jun 06, 2019 1:54 pm

Hi augustk,

You can use ⎕NA and the win32 API to set a limit of characters in an edit control.

The message EM_SETLIMITTEXT is 197.

The following will set a limit of 10 characters to my edit field:

      'f' ⎕wc 'form'
'f.e' ⎕wc 'edit'
'sendmsg' ⎕NA'I4 USER32|SendMessage* P U4 P P'
sendmsg f.e.Handle 197 10 0


Regards,

Vince
Vince|Dyalog
 
Posts: 408
Joined: Wed Oct 01, 2008 9:39 am

Re: GUI reference documentation

Postby Veli-Matti on Thu Jun 06, 2019 3:01 pm

Hmm.. What's wrong with

      'f'⎕WC'Form'⋄'f.e'⎕WC'Edit'('MaxLength' 10)

?

-Veli-Matti
Veli-Matti
 
Posts: 93
Joined: Sat Nov 28, 2009 3:12 pm

Re: GUI reference documentation

Postby AndyS|Dyalog on Thu Jun 06, 2019 3:10 pm

The other thing to try is to create an instance of the object in question and then to look at its PropList. You'll see from the output that there's also EventList, MethodList and ChildList - the output of which you can in general hit F1 on to bring up the relevent help page.
User avatar
AndyS|Dyalog
 
Posts: 257
Joined: Tue May 12, 2009 6:06 pm

Re: GUI reference documentation

Postby Vince|Dyalog on Mon Jun 10, 2019 10:07 am

Hi Veli-Matti,

You're right! I should have tried it.

MaxLength works for both single-line and multi-line edit fields.

Our documentation for MaxLength says that it does not apply to Style Multi edit fields, but it does seem to. I have logged a docs issue for this.
      'f' ⎕wc 'form'
'f.e'⎕WC'edit'('style' 'multi')
f.e.MaxLength←5

Regards,

Vince
Vince|Dyalog
 
Posts: 408
Joined: Wed Oct 01, 2008 9:39 am


Return to New to Dyalog?

Who is online

Users browsing this forum: No registered users and 1 guest