Page 2 of 2

Re: About SCREEN DESIGN

Posted: Thu Nov 19, 2015 5:18 am
by alepap
All @ DCSAY etc will be managed by a DCREAD GUI command.

Are all the options of DCGETOPTIONS also valid in the DCREAD GUI ?
Could I put all my options in the DCREAD GUI ?

In this example, TITLE in DCREAD GUI will be the one displayed and not the TITLE in DCGETOPTIONS.

Code: Select all

   SET DATE FORMAT TO 'mm/dd/yyyy'
   @ 1,1 DCSAY 'Enter a Date' GET dDate PICTURE '99/99/9999' ;
         SAYRIGHT GETSIZE 13
   @ 3,1 DCSAY 'Enter a Number' GET nNumber SAYRIGHT
   @ 5,1 DCSAY 'Enter a String' GET cString SAYRIGHT
   @ 7,1 DCSAY 'Enter Yes or No' GET lLogical PICTURE 'Y' SAYRIGHT

   DCGETOPTIONS ;
      SAYWIDTH 120 ;
      WINDOWHEIGHT 300 ;
      WINDOWWIDTH 400  ;
      BORDER XBPDLG_RECESSEDBORDERTHICK_FIXED ;
      TITLE 'Data Entry' // Store options to GetOptions

   DCREAD GUI ;
      MODAL ;
      TITLE 'Text-Based GETs' ;
      BUTTONS DCGUI_BUTTON_OK + DCGUI_BUTTON_CANCEL ;
      OPTIONS GetOptions

Re: About SCREEN DESIGN

Posted: Thu Nov 19, 2015 6:18 am
by rdonnay
Before we discuss the screen designer anymore, you need to work with the latest build - 263.
This build includes major improvements to the screen designer.

Send me a private email and I will send you download instructions.

Re: About SCREEN DESIGN

Posted: Thu Nov 19, 2015 7:00 am
by Tom
Could I put all my options in the DCREAD GUI ?
DCGET OPTIONS ... or DCGETOPTIONS populates an array "GetOptions"; this one is used by the DC_ReadGui (DCREAD GUI ... OPTIONS GetOptions). You could do this by yourself and just hand the completed array to DCREAD GUI. But in this situation, you have to take care about all options having the right positions in the array (even take care about the lenght of the array). Look at "DCDIALOG.CH" and search for "DCGETOPTIONS". You will see how the array is created:

Code: Select all

GetOptions := { <cName>, <cTitle>, <nWndHeight>, ....,  [<.lLockToOwner.>] }
But it may not be a good idea to do that, since your app may f*ck up if Roger changes the Getoptions array.

If you want to recycle options (use the same options everywhere), just take a look "DC_GetOptDefault()". This function sets one option array as the default for all dialogs. You may add (other) options there.

Re: About SCREEN DESIGN

Posted: Thu Nov 19, 2015 7:47 am
by rdonnay
But it may not be a good idea to do that, since your app may f*ck up if Roger changes the Getoptions array.
It is not likely that I will do that, except I added 1 more element recently to handle design features.