Re: Clear Screen in Window

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

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

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

Search



Quick Links

User menu

Not signed in.

Misc Menu