1. Clear Screen in Window
I need to overwrite a lot of text in a non-editable window( a label type).
I've used repaintWindow(Win) but don't like it very much because it appears
to flash. I've tried to setText(Win,"") and setText(Win," ") but can't get
it to work. Does anyone have any other ideas?.Thanks
in advance.
Regards
Bob
2. Re: Clear Screen in Window
Bob,
Not surprisingly, I'm confused. In the short test I made, it was so much
easier to get text to be cleanly overwritten, I never tried to get it to do
otherwise (ie, make more than one line, although I would like to see an
example of doing that).
Writing text to a label with setText seems to automatically overwrite, as
far as I can see, even when the second text written is "". Could you
provide a short example of how you are writing a lot of text to a label in
the first place, that might help in seeing how to erase it &/or put new
text.
Dan Moyer
----- Original Message -----
From: "bobspringett" <bobspringett at WANADOO.FR>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Sunday, September 10, 2000 3:26 AM
Subject: Clear Screen in Window
> I need to overwrite a lot of text in a non-editable window( a label type).
> I've used repaintWindow(Win) but don't like it very much because it
appears
> to flash. I've tried to setText(Win,"") and setText(Win," ") but
can't get it to work. Does anyone have any other ideas?.Thanks
> in advance.
> Regards
> Bob
3. Re: Clear Screen in Window
Bob,
Ok, maybe I've misunderstood what you are trying to do, but if not, here is
something which works:
<code follows>
include win32lib.ew
constant SimpleWin =
create( Window, "Simple Window", 0, 0, 0, 500, 300, 0 )
global constant DataLabel = create( CText, "aLabel", SimpleWin, 100, 40,
80, 230, 0 )
global constant
WriteButton1 = create( DefPushButton, "WriteSomeText", SimpleWin, 40, 10,
120, 30, 0 ),
WriteButton2 = create( DefPushButton, "WriteOtherText", SimpleWin, 180, 10,
120, 30, 0 ),
WriteButton3 = create( DefPushButton, "EraseText", SimpleWin, 320, 10, 120,
30, 0 )
global procedure onClick_WriteButton1()
for n = 1 to 10 do
setPosition(DataLabel, 10, n*20)
wPuts(DataLabel,"abcdefg")
end for
end procedure
onClick[WriteButton1] = routine_id( "onClick_WriteButton1" )
global procedure onClick_WriteButton2()
setText(DataLabel, "")
for n = 1 to 10 do
setPosition(DataLabel, 10, n*20)
wPuts(DataLabel,"1234567890")
end for
end procedure
onClick[WriteButton2] = routine_id( "onClick_WriteButton2" )
global procedure onClick_WriteButton3()
setText(DataLabel, "")
end procedure
onClick[WriteButton3] = routine_id( "onClick_WriteButton3" )
WinMain( SimpleWin, Normal )
<code ends>
----- Original Message -----
From: "bobspringett" <bobspringett at WANADOO.FR>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Sunday, September 10, 2000 3:26 AM
Subject: Clear Screen in Window
> I need to overwrite a lot of text in a non-editable window( a label type).
> I've used repaintWindow(Win) but don't like it very much because it
appears
> to flash. I've tried to setText(Win,"") and setText(Win," ") but
can't get it to work. Does anyone have any other ideas?.Thanks
> in advance.
> Regards
> Bob
4. Re: Clear Screen in Window
- Posted by LEVIATHAN <leviathan at USWEST.NET>
Sep 10, 2000
-
Last edited Sep 11, 2000
> I need to overwrite a lot of text in a non-editable window( a label
> type). I've used repaintWindow(Win) but don't like it very much
> because it appears to flash. I've tried to setText(Win,"") and
> setText(Win," ") but can't get it to work. Does anyone have any
> other ideas?.Thanks in advance. Regards Bob
>
In the latest bleeding-edge Win32Lib, I noticed a color-coded non-
editable text window example program. Try looking at ex12.exw, see
if it gives ya any ideas.
Blessed Be! --"LEVIATHAN"