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

[REBOL] Re: view problem - updating windows

From: carl::rebol::com at: 26-Apr-2001 9:06

Hi Julia, Saw your email arrive, so thought I would take a crack at answering. To update an element of a layout, you can use SHOW. In order to refer to it, you will need either 1) a variable to refer to it, or 2) to know it's position in the layout. The first is most common. For example: out: layout [ img-var: image %img1.jpg text-var: text "test" 200 ] view/new out img-var/image: load %img2.jpg show img-var text-var/text: "New text here!" show text-var You could also refer to the faces by position with: out/pane/1/image: load %img2.jpg show out/pane/1 In addition, you could refresh the entire layout with: show out However, for very large layouts, that can be "expensive". Note: Buttons have more to them than other types of faces. For instance, to change the color or text of a button requires that you change the /colors or /texts fields of the button face. It all depends on what you are after. -Carl