World: r3wp
[!RebGUI] A lightweight alternative to VID
older newer | first last |
Ashley 24-Sep-2007 [6808] | Would a statically stacked tab-panel suffice? I could knock up a tab-panel2 widget that accepted two blocks of label / action pairs. |
Graham 24-Sep-2007 [6809] | Yes. Though I guess some people might want 3 levels ... |
Robert 24-Sep-2007 [6810] | HTML: Doing static layouts would be OK in the first step. And, this declarative stuff like hooking input-streams, to output-devices is IMO a good aproach. A lot of technologies from the mid 80s / erlay 90s are possible these days. IMO there exist a lot of forgotten things that are pretty cool. |
btiffin 24-Sep-2007 [6811] | Graham; I'm being facetious; but who, other than you, writes apps that need that many tabs. You're adding too many features. :) More seriously. I've hacked an overlay widget by pulling the tab pane out of Ashley's tab-panel (build 95) that uses the same layout model and his select-tab action. Put up a couple of arrows and you can stack as many tabs in an overlay space as you'd like (they would not scroll one at a time; it'd function as banks of tabs; one tab-panel per overlay "tab" but it'll save a fair amount of screen real estate). I could post the code somewhere if you'd like. |
Pekr 24-Sep-2007 [6812] | Multiple lines of tabs are sometimes solved with just one line, and "scrollable" tab panel style - you get arrows on the left and on the right side, so you can have as many tabs as you wish. Of course pushing users to scroll is not very much intuitive, but it solves the case ... |
Graham 24-Sep-2007 [6813x4] | post away :) |
but I only have 4 tabs at present . it's just that I don't have the horizontal space | |
So, I need to stack the tabs vertically to employ the vertical space available. | |
I don't like the scrollable tab style because you can't see all of the tabs available in one glance | |
Pekr 24-Sep-2007 [6817] | Graham - Cyphre's styles pack contains tabs with arrows, so that you can have more than is visible space. Horizontal only though ... You could contract Cyphre to do it for RebGUI .... |
btiffin 24-Sep-2007 [6818x2] | Code at http://peoplecards.ca/rebol/ld2-rebgui.rUse it just like a tab-panel. I use the text that would go on a tab for a comment. Use show widget/select-tab n to switch between overlays. The code conditionally loads rebgui and the widget; so if you are modifiying anything, you'll have to unset ctx-rebgui for each test load. |
Sorry, don't call show with select-tab | |
Graham 24-Sep-2007 [6820x4] | I'll give it a go .. thanks. |
Ashley I'm still seeing the dbl click on an edit-list bug | |
Brian, the advantage for a true tab panel style is that the currently selected panel keeps the button highlighted. | |
So, this is more of a button panel style :) | |
btiffin 25-Sep-2007 [6824] | I use it to emulate the overlays in the Desktop Library, but I thought you might use it like overlay data [ "1" [tab-panel data [ ]] "2" [tab-panel data [ ]] with a couple of arrows, or buttons :) or menu options to determine what bank of tabs are shown. As with many things, I may not be getting what you are really looking for, but I've grown fond of having overlays in RebGUI. |
Graham 25-Sep-2007 [6825] | Ahhh... never thought of that! |
Ashley 25-Sep-2007 [6826x2] | Build#97 uploaded with a 'no-tabs option for tab-panel. Works exactly as per Brian's overlay widget as described above. |
re: dbl-click problem. I can't reproduce this one. I assume this occurs on Windows? What is the dbl-click speed set to? (Control Panel|Mouse Properties|Buttons) Is it a mouse or pen (i.e. TabletPC) that generates the dbl-click in question? | |
btiffin 25-Sep-2007 [6828] | Re: build 97...Very nice. I get to dump a hack. Thanks Ashley. |
Graham 25-Sep-2007 [6829x3] | Yes, windows ... and a mouse. Speed is set to just to the right of middle. |
Is there something I can do to trap the error at the widget level so it doesn't propagate upwards? | |
and yes, it's not easily reproducible | |
Ashley 26-Sep-2007 [6832] | I think adding the dbl-action facet to the choose function in ctx-widgets.r will 'fix' the problem, as in: choose: make function! [ ... ][ ... popup: make face-iterator [ ... alt-action: none dbl-action: none ] ... ] |
Graham 26-Sep-2007 [6833x2] | ok, I'll give that a go |
rebgui-widgets.r ? | |
Ashley 26-Sep-2007 [6835] | Yes |
Graham 26-Sep-2007 [6836] | thanks |
Graham 30-Sep-2007 [6837] | How does one reset a radio-group to it's unselected state? I tried rg/init, and rg/select 0 ( which crashes ) |
Brock 30-Sep-2007 [6838x3] | Graham, I haven't ventured into the world of RebGUI other than the demos, but in View the data attribute of the radio button is none until selected, true when selected, then false when the selection is changed. |
ie. Radio5/data: none | |
I hope RebGUI works the same way. | |
Ashley 30-Sep-2007 [6841x2] | No, the value of face/picked contains the current selection and is set by clicking a radio button or using the select-item function which simulates a click. By default it is not possible to simulate a null click. |
Build#99 uploaded with fix to above. You can now do: rg/select-item 0 or: rg/select-item none | |
Graham 1-Oct-2007 [6843] | thanks |
Graham 6-Oct-2007 [6844x3] | display "" [ radio-group data [ "one" "two" ] [set-focus fld ] fld: field ] do-events shows the focus and then loses it |
display "" [ ck: check data none [ print "checked" ] button "Change" [ set-data ck true ]] do-events doesn't trigger the action on the check | |
Do we need a 'set-action function that triggers an action associated with a widget? | |
Ashley 6-Oct-2007 [6847] | That's not a trivial thing to do with the current design ... and then add the complexity of action types (single, double or alt-clicks; combined with various on-* triggers ... it gets messy very quickly). |
Graham 6-Oct-2007 [6848] | so, how to trigger the action? |
Ashley 6-Oct-2007 [6849] | It should just work, I'll take a look at it later today. |
Graham 6-Oct-2007 [6850x3] | table/set-row does a trigger on the action |
so, there is some inconsistency | |
/select-row ? | |
Ashley 6-Oct-2007 [6853] | The action in that case is a by-product of the primary purpose ... select a row. select-item (radio-group) does tha same. I can't recall whether there's a select-state for check though. |
Graham 6-Oct-2007 [6854] | I guess I should not put complicated code inside the action block ... and just factor it all out. |
Ashley 6-Oct-2007 [6855] | Depends, you can call action functions directly, as in: s: button "Save" [...] button "Do A then save" [... s/action/on-click s] button "Do B then save" [... s/action/on-click s] |
Graham 7-Oct-2007 [6856x2] | rebol [] do %rebgui.r pu: does [ display/parent "" [ table 20x20 options [ multi "item" left .9 ] data [ "a" "b" "c" ] return button "close" [ unview/only face/parent-face ] ]] display "test" [ text "Try multi selecting with control" return button "test" [ pu ] ] do-events |
multi-select fails the second time round. | |
older newer | first last |