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

World: r3wp

[!RebGUI] A lightweight alternative to VID

Ingo
3-Sep-2006
[4674]
Sorry, it's been some time since I last used RebGui, so I've got 
a few questions.
(How) is it possible to ... ?

- change double-click handling of an area? (I would like to call 
a function with the position or word clicked on)
- change keyboard handling in an area? (like add auto-indent)

- have timer event, that fires after specified times (it would be 
ideal, if the timer could be reset on every key-press)
(I don't know how many changes RebGui adds in these areas).

Thanks,

Ingo
Graham
3-Sep-2006
[4675x2]
fld [ single click ] [ double click ] [ right click ]
Not what you're asking?
Ingo
3-Sep-2006
[4677x3]
SORRY !!! (I _REALLY_ should have RTFMed before asking! ;-(
I juast didn't find the the manual at the time, and I seemed to remember 
that it was something really, really advanced, ... and I got only 
2 hours of sleep last night, and ...
Well, thank you ;-) I guess, that's it! ;-)
Graham
3-Sep-2006
[4680x3]
you can create your own keyboard handler ... by altering the existing 
one.
there's an example of a timer event on the front screen of the demo.
Anton, does your code to remove tabs from a tab panel destroy the 
widgets that are present in the removed tabs, or does it just hide 
them?
Ingo
3-Sep-2006
[4683]
OK, thanks, one more question, I have searched the docs, but didn't 
find anything ...
How do I position the caret in a rebgui area?
Ashley
3-Sep-2006
[4684]
Same as in View:

	system/view/caret: at face/text pos
	show face
Anton
4-Sep-2006
[4685]
Graham, I think I never touched the Rebgui tab panel....
Graham
4-Sep-2006
[4686x3]
I'm sure you posted some code on how to dynamically remove tabs from 
rebgui panels
Yes, December 8th http://www.lexicon.net/antonr/rebol/rebgui/add-remove-tab-panels.r
Ashley, how do you programmatically select a tab to display?
Ingo
4-Sep-2006
[4689x2]
Ah, thank you.
Hmm, I want to position the caret, by clicking in a text-list, which 
lists sections of the document.
The action in my text-list
[
         __picked: first face/picked
         show-focus ar-text

         system/view/caret: at ar-text/text sections/:__picked/pos
         show ar-text
      ]

now, when I click into the text-list, ar-text is focused, and the 
caret is shown in my ar-text, but when I release the mouse-key, the 
text-list is focused again.
What can I do here?
Graham
4-Sep-2006
[4691]
Ingo .. check this as in http://polly.rebol.it/test/test/rebgui/../../test/rebgui/edit-area.r
Ingo
4-Sep-2006
[4692]
Thank you, has this been discussed on AltME once? I tried to search, 
but inbuilt search seems to be barely usable
Graham
4-Sep-2006
[4693x3]
Yes, it has been discussed
:)
I use my memory which is better than Altme's search
Ingo
4-Sep-2006
[4696]
It does not solve my problem, though:

edit-area keeps the current focus, while unfocused (to access it 
from the button)

I want the button click to focus on the area (at the new position), 
but at mouse release, the focus switches back to the button.
Graham
4-Sep-2006
[4697]
can you show some demo code ...
Ingo
4-Sep-2006
[4698]
display "Test button focus to area" [
   button "Pos" [
      show-focus ar-text
      system/view/caret: at ar-text/text 10
      show ar-text
   ]
   ar-text: area {1234567890

When I click on the button, the caret is positioned between 9 and 
0,

but when I release the button, the focus changes back to the button}
]
do-events
Graham
4-Sep-2006
[4699]
so when you tab back into the area, you want to keep the 0,9 caret 
position?
Ingo
4-Sep-2006
[4700]
Not exactly. What I want is, that clicking on the button focuses 
the area, and that I am now able to directly type in the area.
Graham
4-Sep-2006
[4701]
oh ...
Ingo
4-Sep-2006
[4702x2]
and, at the given position, yes.
Thinking aloud: I guess that the show-focus ar-text should be placed 
in the unfocus event of the button?
Graham
4-Sep-2006
[4704x2]
yes
but show-focus probably sets the cursor to the end again
Ingo
4-Sep-2006
[4706x2]
I'll try to do some patching now ... sorry, I'm on a modem line, 
and need to be erachable by phone, so bye for now.
The following works with button, but not with text-list (which I 
want to use) ...

display "Try to change feel" [
   tl: text-list  feel [
      engage: func [f a e][
         print a
      ]
   ]
   data [ "click"]
   [print 'action]
]
do-events
probe tl/feel
halt
Anton
5-Sep-2006
[4708]
Graham, now that you show me the code, which is now available here
http://anton.wildit.net.au/rebol/rebgui/add-remove-tab-panels.r
I can almost remember writing it !

Ok, the technique used to add/remove tabs from the tab-panel looks 
quite destructive, replacing all the old tab faces with new ones 
whenever a tab is added or removed.
Graham
5-Sep-2006
[4709x2]
So, writing to the old faces won't make things happy
if you have widgets in the old tabs .. are they destroyed as well?
Anton
5-Sep-2006
[4711]
No, shouldn't be. Just the little tab faces themselves are removed 
and forgotten.
Ingo
5-Sep-2006
[4712]
Sorry, I have some connection problems, so here's the second part 
to above message ... again ... ;-)

When I run the above posted snippet, and click on the text-list, 
I get an output of "action", so the action block is run, not the 
changed engage function.

The 'probe shows, that the engage function has been changed in the 
way I have defined it.

So it seems, that RebGUI holds to an old version of engage for text-lists.
Claude
8-Sep-2006
[4713x2]
hello, where we can find the rebgui.grid done cyphre => http://www.xidys.com/rebgui-grid.jpg
it is very  great !
Graham
8-Sep-2006
[4715]
It is still in testing.
Claude
8-Sep-2006
[4716]
ok thanks for the answer ;-)
Graham
8-Sep-2006
[4717]
Ask Pekr for a copy of the beta version.
Claude
8-Sep-2006
[4718]
do you have a little bug too on widget table. when i run tour.r and 
select  list    text-list  and do a maxime of the windows, the little 
line between two column still stay little !!!!!  (excuse me for ma 
english :-p)
Graham
8-Sep-2006
[4719x2]
use the trac to enter bugs.
http://trac.geekisp.com/rebgui- view existing tickets and if not 
there, please add it.
Claude
8-Sep-2006
[4721x2]
oups the bug is not on text-list but in table widget
i don't find the way to input the ticket !!!
Graham
8-Sep-2006
[4723]
Hmm.  The add ticket menu is removed!