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

World: r3wp

[!RebGUI] A lightweight alternative to VID

btiffin
30-Oct-2007
[6888]
Johan;  RebGUI doesn't use pixels (well it does, but ...)  It uses 
a unit-size that can be set with the request-ui function.

See http://www.dobeash.com/RebGUI/user-guide.html#section-3.3for 
some details.
JohanAR
30-Oct-2007
[6889x2]
Sounds reasonable :) Is there any way to circumvent this for items 
that need a specific pixel size, in my case a picture?
And a related question.. Is it possible to resize the window when 
my picture is changed, so that the new picture doesn't get resized 
to the previous one's size?
btiffin
30-Oct-2007
[6891]
Well, RebGUI allows for widget design but that can seem complicated 
at first.  Another method is judicious use of the span attributes 
and surrounding widgets with box elements set up like elastic widgets 
that will take/give all the space during a resize.


Or wait till Ashley reads this and responds as he always has the 
best and simplest advice.  :)
Graham
30-Oct-2007
[6892x2]
Is there a way for 'display to just return the layout without viewing 
?
like display/only ...
btiffin
30-Oct-2007
[6894]
Umm...check ctx-rebgui/layout  but the source for display does some 
other nifty things other than just create the face.
Graham
30-Oct-2007
[6895x2]
Is there a way to set a backdrop to a display?
I tried setting lo/pane/1/image but that sets the image to the first 
widget in the layout
Ashley
31-Oct-2007
[6897x3]
display "" [
button 10x10
	do [face/image: my-image face/effect: 'fit]
]
Is there a way for 'display to just return the layout without viewing?
 a: ctx-rebgui/layout/only [button 10x10]
Graham
31-Oct-2007
[6900]
what's the code for the layout backdrop?
Ashley
31-Oct-2007
[6901x2]
 Is there any way to circumvent this for items that need a specific 
 pixel size, in my case a picture?

 image defaults to size -1x-1 which means *not* specifying a size 
 will default it to the image size.


 Is it possible to resize the window when my picture is changed, so 
 that the new picture doesn't get resized to the previous one's size?
 This should get you going:

	display "" [
		button [face/parent-face/size: 320x240 show face/parent-face]
	]


Note that in this case the size *is* in pixels as you are modifying 
a face object directly (as opposed to specifying a wudget's *unit* 
size). Hope that helps.
code for the layout backdrop?
 As above:

	display "" [
		button 10x10
		do [face/image: my-image face/effect: 'fit]
	]

or:

	display "" [
		button 10x10
		do [face/image: load %my-image.png face/effect: 'fit]
	]
Graham
31-Oct-2007
[6903x2]
Ok, thanks
Isn't there a dirty? flag in Vid to check to see if an area widget 
has been altered?
Graham
5-Nov-2007
[6905x2]
Ashley, we talked about this before.  I  am looking for a way to 
spell check in a popup or static window attached to the area that 
is being checked, and to double click on the choice, have it replace 
the highlighted text, and then move on to the next text which is 
then highlighted.  I got it working except for the part of highlighting 
the next word that is suspect.  It highlights and then immediately 
loses the highlight .. perhaps something to do with the double click 
and focus system?
So, you lose the context in which you are spell checking the current 
word
Ashley
5-Nov-2007
[6907]
I remember looking at this and concluding that ctx-edit.r would have 
to be changed rather dramatically to allow this ... it has to do 
with the order in which set-focus and show are called. Several minor 
hacks I experimented with (mainly in set-focus) just didn't cut it. 
I put it in the "too hard" basket but may revisit this now that the 
long-running (for me at least) pick-list bug has been fixed; and 
I also have a few users asking about this as well.
btiffin
5-Nov-2007
[6908]
I'd 'here here' on that one.  I've been mucking with a RebGUI based 
editor and getting a Find/Replace dialog working has been an excercise 
in hackery that I'm not a huge fan of.  (Much chasing of tail and 
subverting of code that I have too much respect for to allow the 
hackery.)
JohanAR
6-Nov-2007
[6909]
Any easy and good looking way to get a return key press (in a text 
field) to trigger an ok-button?
btiffin
6-Nov-2007
[6910]
Johan; Try


display "test" [f1: field [b1/action/on-click b1 none] b1: button 
"Ok" [print "The action"]]


You may need to check with on-key if you want to restrict it to just 
"Enter", I'm not real sure what activities cause the action for fields 
to fire.  (Could be focus/unfocus...have to experiment)  and note 
this will not "click" the button, just evaluate it's on-click action 
code.  This advice is just in-the-meanwhile.  Ashley will no doubt 
have thee easy and good looking solution.  :)
Graham
6-Nov-2007
[6911]
Just wondering if it's better to allow one to copy text from an alert 
.. often they're error messages, and users like to copy them and 
email them.
Micha
9-Nov-2007
[6912x2]
how to change  this code  ?  display "test" [ area button "yes"  
button "no"]  . button "yes" have to be under button "on"
so as on this image  http://jacek.x10hosting.com/test.jpg
Graham
9-Nov-2007
[6914x2]
you culd try using a panel
area panel -1x-1 none data [ button "yes" return button "no" ]
Micha
9-Nov-2007
[6916]
thanks
Micha
10-Nov-2007
[6917x2]
how to  show image ?
dispray [ panel: panel white 80x12 data [ ]

button "img1" on-click [ panel/image: load %img1.png]

button "img2" on-click [ panel/image: load %img2.png]

]
Robert
10-Nov-2007
[6919x4]
Micha, a "show panel" is missing after setting /image
And, you shouldn't use the key-word PANEL as variable name.
And, I don't think that PANEL has an /IMAGE ;-)
my-pic: image ...
my-pic/image: load %img1.png
show my-pic
JohanAR
13-Nov-2007
[6923]
rebgui ver 93 seems to crash when a drop-list is double clicked
Graham
13-Nov-2007
[6924x3]
reported  in  Sept.  Ashley suggested


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
		]
		...
	]

as he never saw this, perhaps it's not in SVN  yet
He meant rebgui-widgets.r
DanielSz
13-Nov-2007
[6927x2]
My rebgui UI gets unresponsive while some code is running. Since 
rebol doesn't have threads, I wonder what solution you'd recommend. 
Does the trick of assigning a rate of 0 to a GUI element work in 
RebGUI? Or would you perhaps separate the offending code and use 
"launch" to run a separate rebol process? Or maybe you know some 
other magic that I don't?
The code that blocks the UI is a ftp file upload, which to the best 
of my knowledge is done synchronously, hence the blocking.
Graham
13-Nov-2007
[6929x2]
It happens in VID as well
You need an async version of ftp, or spawn another process to do 
this.
DanielSz
13-Nov-2007
[6931x4]
OK, that's what I was suspecting. Thanks.
For the moment I'm using a progress bar incrementing with each file 
upload.
At least the user has something to look at :)
Correct me if I'm wrong, but there doesn't seem to be an async ftp 
handler available despite the existing async network ports implemenation.
Ashley
13-Nov-2007
[6935x2]
ver 93 seems to crash when a drop-list is double clicked
 ... fixed in later builds.
RebGUI build#101 released. Release notes here: http://www.dobeash.com/RebGUI/release.html#section-10
Graham
13-Nov-2007
[6937]
Correct,there is no async ftp implementation