Marking last word in dcget

This forum is for eXpress++ general support.
Message
Author
User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Marking last word in dcget

#11 Post by rdonnay »

I think I may have another solution.
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
The eXpress train is coming - and it has more cars.

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Re: Marking last word in dcget

#12 Post by c-tec »

Hello Roger,
thank you, this works for me perfect. I need it especially for a software where users correct a lot of text, here I can implement it very easy.
regards
Rudolf
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

skiman
Posts: 1199
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Marking last word in dcget

#13 Post by skiman »

Hi Roger,

Maybe a new parameter for dcget would also be helpfull?
@ 1,0 DCGET cString ... CUEBANNER 'Enter something (1)'
Best regards,

Chris.
www.aboservice.be

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

Re: Marking last word in dcget

#14 Post by rdonnay »

Maybe a new parameter for dcget would also be helpfull?
@ 1,0 DCGET cString ... CUEBANNER 'Enter something (1)'
Chris -

This has been in DCDIALOG.CH for several releases.
I forgot about it. It works now as you suggested.
The eXpress train is coming - and it has more cars.

Post Reply