DCMULTILINE text display

This forum is for eXpress++ general support.
Post Reply
Message
Author
reganc
Posts: 257
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

DCMULTILINE text display

#1 Post by reganc »

Is there an easy way to update an MLE and get the display to always make the last line visible?

I have a number of places where we use DCMULTILINE to display audit logs and I've tried a number of things but never really got a handle on the correct way to do this.

Anybody have any tricks they can show me?
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

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

Re: DCMULTILINE text display

#2 Post by Tom »

Code: Select all

@ x,y DCMULTILINE cStatus ... OBJECT oStatus

(.. somewhere in your code, where oStatus gets updated ...)
FUNCTION UpdateStatus(cStatus,oStatus,nStatusLineWidth)
cStatus += "Something happend!"+CRLF
oStatus:SetData()
oStatus:SetFirstChar(Len(cStatus)-nStatusLineWidth)
Best regards,
Tom

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

reganc
Posts: 257
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

Re: DCMULTILINE text display

#3 Post by reganc »

Tom wrote:

Code: Select all

@ x,y DCMULTILINE cStatus ... OBJECT oStatus

(.. somewhere in your code, where oStatus gets updated ...)
FUNCTION UpdateStatus(cStatus,oStatus,nStatusLineWidth)
cStatus += "Something happend!"+CRLF
oStatus:SetData()
oStatus:SetFirstChar(Len(cStatus)-nStatusLineWidth)
Should have known it would be so simple...!

And even if I am not updating the text and displaying at the same time, I can always use code to work out the last line anyway.
Thanks, Tom
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

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

Re: DCMULTILINE text display

#4 Post by Tom »

A pleasure. :)
Best regards,
Tom

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

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

Re: DCMULTILINE text display

#5 Post by rdonnay »

Tom -

I just used your solution too after exhausting every way to use xbeK_CTRL_END.

Thanks
The eXpress train is coming - and it has more cars.

Post Reply