Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

Rebview: How to update text in Window?

 [1/3] from: yvan_iigs::gmx::net at: 1-Jan-2005 14:55

Hello, I hope this is the right place to post it? I'm new here and a beginner with RebView I have the following problem, please take a look at the code below: REBOL [] a: ["First text" "second text" "last text"] foreach element a [ view layout [ text element ] ] What it does is open a window with the following text on it: First text when I close this window (close button) it opens a new window with he text: second text When I close that window it opens a new window with the text: last text I want to modify this absolute terrific program by inserting a button called next which when pressed should just replace the text with the next in the sequence. Just without to have to close the window manually. But I'm to dumb to do this :) Can anybody help? This should be really easy I think. Cheers Yvan

 [2/3] from: SunandaDH::aol::com at: 2-Jan-2005 4:08

> I hope this is the right place to post it? I'm new here > and a beginner with RebView
Yes it is. Welcome! I'd do something like below -- basically, added a button to the layout to cycle around the texts. a: ["First text" "second text" "last text"] unview/all view layout [ tb: text a/1 button "next" [ tb/text: select a tb/text if none? tb/text [tb/text: a/1] show tb ] ] Of course, depending on what you are trying to do, this may be the solution unview/all view layout [ rotary "First text" "second text" "last text" ] Sunanda

 [3/3] from: yvan_iigs::gmx::net at: 2-Jan-2005 16:01

Hello Sunanda, thank you, that did it. I just replaced if none? tb/text [tb/text: a/1] with if none? tb/text [unview/all] because when I'm through with the strings I want to quit the view. Cheers Yvan] On 2.01.2005, you wrote: