About SCREEN DESIGN

If you are converting a text-based Clipper application, a FoxPro application or just writing an application from scratch, use this forum for your eXpress++ questions.
Message
Author
User avatar
alepap
Posts: 94
Joined: Tue Jul 28, 2015 5:15 am

Re: About SCREEN DESIGN

#11 Post 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

User avatar
rdonnay
Site Admin
Posts: 4774
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: About SCREEN DESIGN

#12 Post 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.
The eXpress train is coming - and it has more cars.

User avatar
Tom
Posts: 1205
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: About SCREEN DESIGN

#13 Post 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.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4774
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: About SCREEN DESIGN

#14 Post 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.
The eXpress train is coming - and it has more cars.

Post Reply