Re: Writing a stream of data to an EditText box

new topic     » goto parent     » topic index » view thread      » older message » newer message

JAYBEEDEE wrote:
> 
> Thanks to Robert Craig for his comments about C programs displaying on full
> screen.
> I found a solution amongst the Troubleshoot section of the Manual.
> Alt+Enter toggles between full screen and a window - simple!
> 
> Now for my latest problems:
> How do you write a stream of data (atoms or integers) to an EditText box or
> similar
> control in Windows IDE (judith's).
> 
> In a simple example I want to write the results of a for...do loop
> so that all the output is visible on the same line.
> 
> for x=1 to 10 do
> setText(EditText1,x)
> end for
> 
> Hoped for output would be 1  2  3  4  5  6 ... 10
> 
> I have also tried all permutations of wPuts(), wPrintf(), and wPrint() and the
> best
> I can achieve is for each number to overwrite the previous, ending up with 10.
> I have also tried getScrollPos() and setScrollPos() to try to move the text
> along a bit,
> but no go. I suspect that EditText boxes do not have a cursor location
> facility.
> 
> What is the solution?
> 
> Second question.
> 
> In the progressbar.exw demo bundled with W32lib the output to the progress bar
> is
> setText(Gauge, sprintf("%d%% (%d)", sequence etc...
> 
> Can someone explain the format string?  %d I'm familliar with, but can't
> figure
> out what the rest does,
> particularily the (%d). It doesn't seem necessary as a simple "%d" works fine.
> 
> Again, any help gratefully received.
> 
> jaybeedee

sequence text text = {}

for x=1 to 10 do
text&= sprintf("%d ",{x}) -- note space so number won't run together
end for
-- set the edittext1 with the text sequence.
setText(EditText1,text)





Bernie

My files in archive:
WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API 

Can be downloaded here:
http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu