Hi guys
I would like to be able to move the cursor within an MLE so that the bottom line is visible immediately. I want to have an MLE hold progress text and show what is currently being done...
I have tried various things in the past but not found a solution that works reliably.
Does anyone know how to do it?
XbpMLE() manipulation
XbpMLE() manipulation
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com
Real Business Applications Ltd
http://www.rbauk.com
Re: XbpMLE() manipulation
Code: Select all
@ 1,1 DCMULTILINE cText OBJECT oText ... EVAL {||oText:Enter := {||oText:SetFirstChar(Len(cText))}}
Code: Select all
EVAL {|o|o:Enter := {|a,x,o|o:SetFirstChar(Len(o:EditBuffer()))}
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: XbpMLE() manipulation
Thanks Tom...that was a great help!Tom wrote:or, more unspecific:Code: Select all
@ 1,1 DCMULTILINE cText OBJECT oText ... EVAL {||oText:Enter := {||oText:SetFirstChar(Len(cText))}}
Code: Select all
EVAL {|o|o:Enter := {|a,x,o|o:SetFirstChar(Len(o:EditBuffer()))}
I made a small function (with the only paramter being the mle object) which also did a setdata() to make sure the string had been updated, used editbuffer to get the position, setmarked to move the cursor there and the whole thing is wrapped in a lockupdate / invalidaterect block to stop any flickering.
Works like a charm...
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com
Real Business Applications Ltd
http://www.rbauk.com
Re: XbpMLE() manipulation
Hi, Regan.
BTW, if it's something like a protocol viewer, moving to the bottom can also be done inside the function which updates the MLE contens. Same code.
that was a great help!
BTW, if it's something like a protocol viewer, moving to the bottom can also be done inside the function which updates the MLE contens. Same code.
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: XbpMLE() manipulation
Regan -
I always thought that browsing an array was easier to use for progress text.
I would add the next line of text to the array, do a oBrowse:goBottom() and refresh the browse.
Roger
I always thought that browsing an array was easier to use for progress text.
I would add the next line of text to the array, do a oBrowse:goBottom() and refresh the browse.
Roger
The eXpress train is coming - and it has more cars.
Re: XbpMLE() manipulation
Hi, Roger.
This is in fact easier, but it limits the to-be-added text to the column width. So, you need to format/break the (new) text if your protocol function adds multi-lined information.
This is in fact easier, but it limits the to-be-added text to the column width. So, you need to format/break the (new) text if your protocol function adds multi-lined information.
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: XbpMLE() manipulation
offtopic :
btw. did you know how to set Tabstop in a XbpMLE() ?
btw. did you know how to set Tabstop in a XbpMLE() ?
greetings by OHR
Jimmy
Jimmy