Re(2): Hiding self in Rebol/View - show?: false
[1/5] from: arolls:bigpond:au at: 7-Feb-2001 15:23
But this doesn't work:
view layout [b: button 100x100 [b/show?: false show b]]
so I'm confused.
Is the face to hide within the button 'b somewhere?
Anton.
[2/5] from: petr:krenzelok:trz:cz at: 7-Feb-2001 8:04
Anton wrote:
> But this doesn't work:
> view layout [b: button 100x100 [b/show?: false show b]]
view layout [b: button 100x100 [hide b]]
can't imo work, as it reacts upon mouse button press, but after the 'hide
takes effect, button is redrawn as it just comes from pressed state to
unpressed???
well, try this ....
view layout [b: button 100x100 c: button "hide" [hide b]]
but then ... we don't hide "self"
-pekr-
[3/5] from: gjones05:mail:orion at: 7-Feb-2001 3:48
Anton wrote:
> But this doesn't work:
> view layout [b: button 100x100 [b/show?: false show b]]
<<quoted lines omitted: 11>>
> [rebol-request--rebol--com] with "unsubscribe" in the
> subject, without the quotes.
Hi, Anton,
I suspect that Allen meant something more like:
view l: layout [b: button [b/show?: false unview/all view l]]
Hope this does the trick.
--Scott
[4/5] from: allenk:powerup:au at: 7-Feb-2001 23:38
Thanks for correcting that Scott,
Now if you really want to remove self you can provide your own feel
at its simplest is..
view layout [
button "Click me to hide!" 120
feel [engage: func [f a e][hide f ]]
]
a bit more elaborate
view layout [
button "Click me to hide!" 120
feel [
engage: func [face action event][
switch action [
down [face/state: on]
alt-down [face/state: on]
up [if face/state [hide face exit] face/state: off]
alt-up [if face/state [hide face exit] face/state: off]
over [face/state: on]
away [face/state: off]
]
cue face action
show face
]
]
]
Cheers,
Allen K
[5/5] from: d4marcus:dtek:chalmers:se at: 13-Feb-2001 21:44
On Wed, 7 Feb 2001, Allen Kamp wrote:
> Now if you really want to remove self you can provide your own feel
Unfortunately that won't do it. To be a bit more verbose, I can say that
whether the button should be hidden or not depends on a bunch of other
variables, and the hiding is triggered not only by this button but by
other buttons.
The present resize function (with some recoloring) will have to do for
now. Actually, if there was a way to deactivate or "shade" the button, it
would be suitable as well. But don't bother, it's not important.
Marcus
------------------------------------
If you find that life spits on you
calm down and pretend it's raining
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted