r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!RebGUI] A lightweight alternative to VID

Ashley
2-Nov-2006
[4913x3]
Spell-check requires a locale.dat file (which you can copy and rename 
from those under the language directory) and a matching dictionary 
file in the dictionary directory. Example:

	1) Copy %language/British.dat %locale.dat
	2) Download and unzip %British.dat into %dictionary/British.dat
	3) Run %tour.r
	4) Click "Field" then "Area" tabs
	5) Click in the area and press Ctrl+S


This should bring up a spell-check dialog with suggested word replacements.
Hmm, I've just noticed that an error occurs upon completion of spell-check. 
I'll have a look at this one.
Build#39 available. Fixes the above issue and makes two other minor 
changes:

	1) Bumped the min required View version to 1.3.2

 2) Deleted the last line of %ctx-rebgui.r (which issued a halt if 
 the script was invoked in isolation - see Ladislav's comment in the 
 SQLite group from 2nd Nov)
Louis
2-Nov-2006
[4916]
Ashley, thanks. Works now.
Graham
7-Nov-2006
[4917]
Is there an accessor that resizes eg. an area field using the current 
metrics system?
Ashley
8-Nov-2006
[4918]
Not sure I understand the question, do you simply mean the #HW directives? 
Or an accessor that you can invoke to resize manually?
Graham
8-Nov-2006
[4919]
manually
Ashley
8-Nov-2006
[4920]
Well the short answer is no [not currently]. What are you trying 
to do that would need this? Resize pretty much works behind the scenes, 
you shouldn't have to worry about it.
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?