TOOLBAR Updated
Whoa, what's BUTTON-BAR?
I created a separate style called BUTTON-BAR for this. The dialect largely works the same, but the access to creating the buttons is a little easier, and there are 5 predefined buttons with predefined actions in the DATA-STORE block that work similarly to what you see in ALERT and REQUEST.
In your layout, you'd create the button bar like this:
view layout [button-bar with [data: [ok-btn cancel-btn]]]
And presto:
Just like TOOLBAR, the button bar will stretch itself
according to the width of your window or wherever you
need it, but by default, it grows to the size of what
the buttons require.
BUTTON-BAR is still not mentioned in the docs, but you can study the details
of BUTTON-BAR in the source code at the bottom, along
with the OK-BAR and OK-CANCEL-BAR styles. Those
bars are standard bars for even easier button
layouts.
Enjoy!
Toolbar Issues
However there is also a single issue that causes
Rebol/View 1.3.2 to crash and I've backtracked it to
be a part of some FEEL code that uses DETECT to
detect when the icon should be highlighted according
to mouse position. Along with this, you need
to have an INFORM window open. REBOL/View
crashes when you close the INFORM window. All of this
has been reduced a while ago into RAMBO entry
#4137.
It's rare, but the more complex your layout it, the
more often it happens.
So what about changing the TOOLBAR code to get rid of
the problem? I haven't yet found a solution; TOOLBAR
mimics the toolbars used in MacOSX rather closely,
including mouse over behaviour and the current
solution using DETECT, is the only one, I've been
able to find.
If you want to help, I can post a more technical note
on how the FEEL code works. Leave your comments
below. ![]()
Toolbar update
The default for TOOLBAR is still 100x50, but BUTTON-BAR is now set to
You can find TOOLBAR in the Downloads section.
Toolbars Galore
TOOLBAR is a VID widget which resembles a typical MacOSX toolbar. While it's not as flexible, it adds some oomph to making toolbars with Rebol.
Yes, it's the part at the top of the window you
are supposed to notice!
It can be
found on the download page. Enjoy!