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

[REBOL] Re: My custom stylesheets

From: brett:codeconscious at: 26-Jul-2001 13:13

Hi Etienne, In order to see the effect of another stylesheet - you need to recreate the GUI by using LAYOUT. That is, you need to call LAYOUT each time you want to use a new stylesheet. This is because the stylesheet is interpreted by LAYOUT to create the faces of your GUI. I think you may have found out earlier, there is no point just changing the stylesheet itself an expecting the changes to take effect on existing windows (faces). In terms of structuring your GUI there are many ways. One idea is to UNVIEW/ALL and then re-create your GUI by calling view/new layout [....] each time you want to change styles. Another idea is to create a main window with a subpanel (see the subpanel howto). Then each time you want to change to a new stylesheet, create a new subpanel face and set it inside the main panel. For both these solutions you will probably need to think about keeping your layout specification block as a variable which can be copied and modified each time you call layout. For example: my-layout: [ Title "Example" field] for i 1 3 1 [ new-layout: copy my-layout append new-layout compose [button (join "test" i)] view layout new-layout ] HTH, Brett.