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

Hiding self in Rebol/View - shrink size to 1x1?

 [1/3] from: arolls:bigpond:au at: 4-Feb-2001 14:16


How about this? view layout [b: button 100x100 [b/size: 1x1 show b]]

 [2/3] from: allenk::powerup::com::au at: 7-Feb-2001 8:49


Or you can set the face/show?: false ,to hide the face without having to resize it. Cheers, Allen K

 [3/3] from: d4marcus:dtek:chalmers:se at: 6-Feb-2001 22:40


On Sun, 4 Feb 2001, Anton wrote:
> How about this? > view layout [b: button 100x100 [b/size: 1x1 show b]]
Good enough. Strange that I couldn't think of that myself. Thanks! A more general (but abusive) approach follows: resize: function [ "Resize a face. Warning: Uses the data field." b [object!] /max /min ] [ lsize ] [ lsize: b/size either lsize = 1x1 [ if (not min) and (value? 'b/data) [b/size: b/data] ] [ if not max [b/data: lsize b/size: 1x1]] show b ] view layout [ button "Toggle" [resize b] b: button "Min" [resize/min b] button "Max" [resize/max b]] Marcus ------------------------------------ If you find that life spits on you calm down and pretend it's raining