[guiserver-0.4] button question & bug
Posted: Thu Jun 14, 2007 5:56 pm
Hi Lutz,
How do I change the "PRESSED or TOGGLE" color on a button?
Its currently always the color from the look-and-feel default. (it seems)
small remark ->
Toggle-button is unable to handle "" for an empty button text whereas
button does... for toggle-button the text is always "..." when using "".
Bug ->
There is a bug in toggle-button... the code below
shows me sometimed garbage in the text when using "" instead of " ".
That is together with the gs:set-size... odd...
execute this code, and then without the gs:set-font..
On linux i see garbage as text..
sometimes this hapens and sometimes not?? odd to
reproduce...
(gs:init)
(gs:set-look-and-feel "javax.swing.plaf.metal.MetalLookAndFeel")
(gs:frame 'F1 200 200 500 500 "test")
(gs:set-grid-layout 'F1 1 1 1 1 )
(gs:panel 'BP)
(gs:set-background 'BP 0 0 0)
(dotimes (x leds)
(set 'b (sym (append "B" (string x))))
(gs:toggle-button b 'nix "" true)
(gs:set-font b "Sans Serif" "1" )
(gs:set-background b 0 0 0)
(gs:set-foreground b 1 1 1 )
(gs:set-size b 70 70)
(gs:add-to 'BP b))
(gs:add-to 'F1 'BP)
(gs:set-visible 'F1 true)
Norman.
How do I change the "PRESSED or TOGGLE" color on a button?
Its currently always the color from the look-and-feel default. (it seems)
small remark ->
Toggle-button is unable to handle "" for an empty button text whereas
button does... for toggle-button the text is always "..." when using "".
Bug ->
There is a bug in toggle-button... the code below
shows me sometimed garbage in the text when using "" instead of " ".
That is together with the gs:set-size... odd...
execute this code, and then without the gs:set-font..
On linux i see garbage as text..
sometimes this hapens and sometimes not?? odd to
reproduce...
(gs:init)
(gs:set-look-and-feel "javax.swing.plaf.metal.MetalLookAndFeel")
(gs:frame 'F1 200 200 500 500 "test")
(gs:set-grid-layout 'F1 1 1 1 1 )
(gs:panel 'BP)
(gs:set-background 'BP 0 0 0)
(dotimes (x leds)
(set 'b (sym (append "B" (string x))))
(gs:toggle-button b 'nix "" true)
(gs:set-font b "Sans Serif" "1" )
(gs:set-background b 0 0 0)
(gs:set-foreground b 1 1 1 )
(gs:set-size b 70 70)
(gs:add-to 'BP b))
(gs:add-to 'F1 'BP)
(gs:set-visible 'F1 true)
Norman.