World: r3wp
[!RebGUI] A lightweight alternative to VID
older newer | first last |
Graham 8-Nov-2006 [4921] | I had a screen where I had 4 area widgets and I wanted to just expand the top area widget and hide all the others with a toggle button. |
CharlesW 8-Nov-2006 [4922] | I am trying to get an understanding of RebGui using the tour.r. Can someone assist me with bit of code that will show 3 or 4 images down the left side of a window and a tabbed panel directly to its right. IE: Icons vertically down the left next to a panel that fills the remainder of the window. |
Graham 8-Nov-2006 [4923x3] | display "" compose/deep [ image %1.png return image %2.png return image %3.png @ 50x0 tab-panel 190x50 data [ "p" [] "a" [] "n" [] "e" [] "l" [] ] |
untested | |
substitute "at" for "@" ! | |
Ashley 8-Nov-2006 [4926] | Or use a group-box, as in: display "Test" [ group-box "Images" data [ after 1 image %images/go-first.png image %images/go-first.png image %images/go-first.png ] tab-panel 20x30 data ["A" [] "B" []] ] |
Graham 8-Nov-2006 [4927] | what does "after 1" do ? |
Ashley 8-Nov-2006 [4928x2] | http://www.dobeash.com/RebGUI/display.html#section-3.3.2 |
Graham, with regards to your resize question, the following should be enough to get you started: display "Test" [ a: area #HW b: area button [ctx-rebgui/span-resize a as-pair b/size/x 0 hide b show a] ] If you want to take into account margin and gap sizes then you'll need to use values from ctx-rebgui/sizes | |
Graham 8-Nov-2006 [4930] | thanks. |
CharlesW 9-Nov-2006 [4931] | thanks for the code snippet. Is there any way to add a background to the DISPLAY? |
Ashley 9-Nov-2006 [4932] | Two main ways: ctx-rebgui/colors/window: sky ; global change display "Test" [ area do [face/color: sky] ; display-specific change ] can do similiar things with the effect facet as well. |
Louis 9-Nov-2006 [4933] | How can you make a graphic to be the background? |
Ashley 9-Nov-2006 [4934] | display "Test" [ area #HW do [face/image: load %images/setup.png face/effect: 'fit] ] |
Louis 9-Nov-2006 [4935] | Thanks. |
Graham 10-Nov-2006 [4936x3] | In 'display, there is this code foreach window view*/screen-face/pane [ if title = window/text [return] ] which should be changed to: foreach window view*/screen-face/pane [ if title = window/text [return none] ] so that if you have: win: display "title" [] ... an error is not produced as win does not have a value |
Don't know if this is in the current table widget .. but if you click on the header of an empty table make object! [ code: 303 type: 'script id: 'expect-arg arg1: 'index? arg2: 'series arg3: [series! port!] near: [index? find parent-face/data last-selected] where: 'action ] | |
Looks like this bug is still in current table widget. | |
Ashley 10-Nov-2006 [4939] | Can't reproduce that with the following line: table options ["A" left .5 "B" left .5] data [] do you have a simple test case? |
Graham 10-Nov-2006 [4940x3] | I wonder if it's related to the previous problem...with tables. |
I have a table populated .. and remove each row. Once it's empty, and I try and sort, I get the error. But I have not updated to the latest table code yet. | |
Ok, problem is fixed in latest rebgui. | |
Ashley 10-Nov-2006 [4943] | Build#42 (Trac only) has your "return none" fix plus a fix to the long-standing tool-bar tooltip bug (tooltip not hiding after tool-bar button clicked). |
Graham 11-Nov-2006 [4944x2] | I would like to see an enhancement to tables so that /selected/block returns series of blocks. |
the reason is that if you are have anonymous tables, the only way to work out the length of a row is to take all the selected and divide by the length of picked | |
Ashley 11-Nov-2006 [4946] | How about just adding 'cols and 'rows attributes then? |
Anton 11-Nov-2006 [4947] | What if rows have variable lengths ? |
Graham 11-Nov-2006 [4948] | don't think allowed ...Anton |
Anton 11-Nov-2006 [4949] | (Ok, sorry, that was not a well-considered comment of mine.) |
Ashley 16-Nov-2006 [4950x3] | Build#45 (Trac only). Includes the following enhancements: |
- display now returns face - clear-widget uses radio-group/select-item and table/text-list select-row - table/rows attribute added to complement table/cols - text-list/rows attribute added - get-input and set-input funcs added These later functions allow you to easily get and put values into a display or tab-panel, even one containing nested grouping widgets such as 'group-box or 'tab-panel. Handles the following input widgets: area check check-group drop-list edit-list field group-box password radio-group slider tab-panel table text-list. The /type refinement of get-input is usefull in design/debug mode to get a formatted list of widget type/value pairs. | |
Example code to demonstrate the use of these two functions. d: display "Test" [ after 3 area "area" check true check-group data ["check" true] drop-list data ["drop-list"] edit-list data ["edit-list"] field "field" group-box "group-box" data [ field "field" ] password "password" radio-group data [1 "radio-group"] slider data .5 tab-panel data ["A" [field "Tab-panel"] "B" []] table options ["col" left 1.0] data ["row1" "row2"] text-list data ["line1" "line2"] button [a: get-input d b: get-input/type d halt] button [ put-input d ["Text" true [false] "A" "B" "text" ["xx"] "" 1 1 ["Bob"] [1] [2]] show d ] ] | |
Pekr 16-Nov-2006 [4953] | put-input? |
Graham 16-Nov-2006 [4954] | or set-input ? |
Ashley 16-Nov-2006 [4955] | I'm still open on the names, and will probably add a 'clear-input type function to round out the set. I chose the word 'input as both 'form and 'values implies a superset of input [values]. I also considered other action words such as read, write, load and save; but to my mind they are so well established in REBOL that they already have other meanings (e.g. load-form, like load-image, would imply loading a form from disk). 'set is OK except that the logical complement is 'unset. |
Graham 16-Nov-2006 [4956x2] | load-fields? |
the ? above is because you introduce it as saying you have implemented 'set-input and then the example uses 'put-input .... | |
Ashley 16-Nov-2006 [4958] | Ah, missed that. It should be get and put. load-fields suffers from the dual problems of "load" (as described above) and begs the question, "what about other widgets that are not fields but except input". We'de have folks looking for load-area, load-text-list, etc |
Graham 16-Nov-2006 [4959] | fill-fields |
Robert 17-Nov-2006 [4960x3] | Ashley, please take a look at the xpeers RebGUI stuff. We have added a lot and should align the code lines. |
Resizing: I have a question how to best implement the following: - I have three tables from left to right - I want to make a horizontal resizing in that the middle and right table are moved and narrowed. - The left most tables only uses #X - The moving should be right aligned to the left side table I hope you understand what I mean. Using #WX screws up the layout as the gaps between the table get to big | |
any idea how I can get the desired resizing effect? | |
Ashley 17-Nov-2006 [4963] | Not exactly sure what you want, something like this: display "Test" [ table #W options ["" left 1.0] data [] table #X options ["" left 1.0] data [] table #X options ["" left 1.0] data [] ] |
Robert 18-Nov-2006 [4964] | But than the tables 2 and 3 don't change their width, right? So what I want is that all three tables get narrowed and are still horizontally aligned with the distance given by SPACE 2x2 for example. |
Ashley 18-Nov-2006 [4965] | Current system does not support more than one resize per axis (i.e. you can have one #W per x axis and one #Y per y axis). What you are asking for is a form of proportional resizing. |
Pekr 20-Nov-2006 [4966] | Robert - what are your xpeers additions to RebGUI? |
Robert 20-Nov-2006 [4967] | We enhanced a lot of the widgets etc. to much to list here. The problem is I don't find the time to document everything and publish it. So, if someone want to do it, let me know. |
Pekr 20-Nov-2006 [4968x2] | are results even mergable? |
I will need to release grid too :-( I want to have it out 1.12 as is - just a bit of further documenting needed | |
Robert 20-Nov-2006 [4970] | It takes time but yes, the changes are mergeable. |
older newer | first last |