R3 GUI: how to use 'tab-box
Started by Rex on 15-Sep-2014/10:54:06-7:00
Rex — 15-Sep-2014/10:54:06-7:00
Could anyone give me an example of how to use this widget? I found it in the dialect, but does not know how it works.
rebolek — 18-Sep-2014/3:45:34-7:00
Hi, usage is of tab-box is simple:
TAB-BOX list-of-tabs [block!]
where list-of-tabs has this format:
name [string!] layout [block!]
So here's simple example:
tab-box ["tab #1" [button "In tab one"] "tab #2" [button "In tab two"]]
OTOH, there were some changes in R3GUI and it's possible that tab-box currently does not work because of it. I'd like to fix, but unfortunately I haven't got time right now. If you need it, contact me privately at rebolek {@t} gmail {d0t} com, I'll see what I can do.
Rex — 19-Sep-2014/2:53:48-7:00
Thanks for the illustration, Rebolek. But the example does not work on my computer (My R3GUI version is 4988). The error message is "in does not allow none! for its object argument". I do not have any urgent task which requires me to use that widget. I ask just because I am curious. So take your time in fixing the bugs :-)
Rex — 19-Sep-2014/2:57:15-7:00
Besides, I am also quite curious about the 'tab-button widget and the 'old-tab-box widget, what are they? Could you please also give some examples?
Linh — 19-Sep-2014/6:17:15-7:00
The error message is "in does not allow none! for its object argument"
Open the r3-gui.r3 and replace "tab:layout/options tab" with "tab: layout/options/only tab"
Linh — 19-Sep-2014/6:37:45-7:00
sorry the typo
replace "tab: layout/options tab" with "tab: layout/options/only tab"
Rex — 22-Sep-2014/7:44:25-7:00
Thanks, Linh. But it does not work on my computer. The error message is "Script error: -apply- does not allow word! for its content argument". I guess we should wait till the new release come out.
Rex — 22-Sep-2014/7:51:57-7:00
Sorry, I tried again and this time it works. Guess I have confused the old and new gui files.
Thanks, Linh:)
Linh — 22-Sep-2014/23:12:48-7:00
Hi Rex
When use the current 'tab-box, 'tab-box must be the last face in a group (tested under Linux 32 bit, saphirion r3-gui git-e6b82d5, atronix r3-32-view-linux git-05b7d74)
-1st example-
R E B O L []
do %r3-gui.r3
;backdrop
view [
-tab-box ["tab" [button]] ;error: {TO-DRAW - syntax error at: chrome 1x1 none 0.0 24.0 90.0 box 1x1 258x22 1.0 t ...}
-button
]
-2nd example-
R E B O L []
do %r3-gui.r3
;backdrop
view [
-button
-tab-box ["tab" [button]] ;ok
]
-3rd example-
R E B O L []
do %r3-gui.r3
;vgroup
view [
-vgroup [
--tab-box ["tab" [button]] ;error: {TO-DRAW - syntax error at: chrome 1x1 none 0.0 24.0 90.0 box 1x1 258x22 1.0 t ...}
--button
-]
]
-4th example-
R E B O L []
do %r3-gui.r3
;vgroup
view [
-vgroup [
--tab-box ["tab" [button]] ;ok
-]
-button
]
Reply