Windows sees a string of Chr(0) characters as empty.
This would then allow us to show the banner without the need to use a picture or size the get.
The Get will automatically size to the length of the string even if it is filled with Chr(0) characters.
The only concern I have is saving Chr(0) characters back to a database.
There may be a need to Strtran() them back to spaces.
It seems that I could enable the Strtran() stuff automatically in eXpress++ if a cuebanner is used.
I have to think about this.
Run the below code. It works. Note that the 2nd object is a DCSLE.
Code: Select all
#INCLUDE "dcdialog.CH"
FUNCTION Main()
LOCAL GetList[0], aString[3]
AFill(aString,Repl(Chr(0),30))
@ 1,0 DCGET aString[1] PICTURE Repl('!',30) ;
EVAL {|o|o:cueBanner := 'Enter something (1)'}
@ 2,0 DCSLE aString[2] SIZE 30 ;
FONT '10.Courier New' ;
EVAL {|o|o:cueBanner := 'Enter something (2)'}
@ 3,0 DCGET aString[3] ;
EVAL {|o|o:cueBanner := 'Enter something (3)'}
DCREAD GUI FIT ADDBUTTONS
RETURN nil
PROC appsys ; return