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

[REBOL] Re: Question on text formatting

From: gscottjones:mchsi at: 29-Aug-2002 18:07

Hi, Andy, From: "Andy Finkel"
> Now, this is a _very_ interesting clue. > > If I use a similar example, > > view/new lay: layout [ button button button ] > lay/pane/1/text: "hithere" > > show lay/pane/1 > wait none > > The text on the button changes. In fact, I can change it to anything I > like, again and again. > > But if I do something like: > > view/new lay: layout [ button "test" button "test1" button "test" ] > lay/pane/1/text: "hithere" > show lay/pane/1 > wait none > > Or > > view/new lay: layout [ button copy "test" button copy "test1" button > copy "test" ] > lay/pane/1/text: "hithere" > show lay/pane/1 > wait none > > Then the text is fixed to be "test". Every time I show, Rebol changes > it back to the original text (which was test); Rebol must be storing > the original text in some hidden place when I created the button, and > always refreshing from that, rather than from the values stored I was > expecting. > > (this also seems to apply to colors). > > So if I create a grid of blank buttons (or possibly uncolored buttons), > I might be able to programatically change the appearance of the button > to simulate non-mouse highlighting.
You appear to have stumbled on one of those gray areas that is an exception (or possibly a "bug" or an under appreciated "feature"). I do not recall if there is a way to get *to* this data. Here is another work around to defining the button text in the layout and still being able to get at it. Hopefully a wizard can elucidate that real nature of this beast. view/new lay: layout [ b: button with [text: "test"] button "change above" [ lay/pane/1/text: "dither" show b ] button "change top" [ ; the following is another way to change the info b/text: "yon" show b ] ] lay/pane/1/text: "hither" show b do-events --Scott Jones