World: r3wp
[!RebGUI] A lightweight alternative to VID
older newer | first last |
BudzinskiC 16-Apr-2010 [8684] | Thanks a lot :) Before I do something completely wrong again... I also want to scroll to a certain line in the text area if possible. My approach now would be to see if I can somehow see how many lines of text are displayed in the text area, calculate the percentage of the line I want to scroll to based on this total number of lines, divide that by 100 and use it for a/pane/data. Right..? |
Graham 16-Apr-2010 [8685] | Is that informatio available? |
BudzinskiC 16-Apr-2010 [8686] | This seems to work: display "test" [ a: area (mold ctx-rebgui/colors) button [ scroll-to-line: 5 line-height: 30 total-lines: (second size-text a) / line-height percent: ((scroll-to-line - 1) / (total-lines / 100)) / 100 a/pane/data: percent show a ] ] The height of a line is hardcoded though which means it stops working if the font size is changed. Is there a way to get the current line height? |
Graham 16-Apr-2010 [8687] | presumably you need to get the font information out |
BudzinskiC 16-Apr-2010 [8688] | a/font/size gives me the font size, which is 12 by default. But does that help in getting the line height? Is there some kind of standard so that a font with the size 12 always has a height of font-size * something? Don't know anything about fonts... |
Graham 16-Apr-2010 [8689] | Nor me ... |
BudzinskiC 16-Apr-2010 [8690] | :) Thanks anyhow |
Graham 16-Apr-2010 [8691x2] | but if you can get the font name, font size you should be able to create some text and then get the sizes from that |
So, instead of using your whole area, just use one character in a face | |
BudzinskiC 16-Apr-2010 [8693] | Ah you mean like in an invisible text container? That should work, right. Thanks :) |
Graham 16-Apr-2010 [8694] | Yep, something like that :) |
Ashley 18-Apr-2010 [8695] | ctx-rebgui/sizes/font-height |
BudzinskiC 18-Apr-2010 [8696] | Thanks Ashley. That only shows the height for the default font though. I am displaying three text areas with different font sizes, so I set the font size in the areas directly. I had to use an invisible text area now anyway though because I forgot that to be able to scroll to a certain line in the text area I have to find out in which line a certain word, to which I want to scroll, actually is :) So now I made a test text area for this and positioned the "real" text area on top of it so that the test text area is completely covered by it. I copy the text up till the word I want to scroll to into the test text area and then look at the text size of the test text area and use that information to scroll the "real" text area to this word. It isn't working correctly yet but it should so I guess I just made a stupid mistake somewhere, have to look at it again tomorrow. |
Graham 18-Apr-2010 [8697] | Good luck! We need this for the spell checker |
Claude 23-Apr-2010 [8698] | hi, how i can force a field to be disabled ? i try myfield/options: [info] but it don't work !!!! |
BudzinskiC 23-Apr-2010 [8699] | You can toggle enabled/disabled with the set-state function. Example app: display "test" [a: field do [set-state a]] do-events |
Claude 23-Apr-2010 [8700] | great thank you very much ;-) |
marek 23-Apr-2010 [8701x6] | With build 216 I get this:- |
>> display "" [f: field do [set-state f]] do-events ** Script Error: set-state expected state argument of type: logic ** Where: init ** Near: set-state f But better result gives this:- | |
display "" [button disable] do-events ;- this simple (I can't change sending messages on my Mint, sorry for multi replays) | |
Just found out how to | |
... it doesn't | |
work (sorry again) | |
Graham 24-Apr-2010 [8707] | set-state f false |
Claude 2-May-2010 [8708x9] | hi, i would like to change the image of a variable |
my-image: image %./nophoto.jpg | |
i try this but i have a black image !!!!! | |
my-image/image: make image! 60x80 load %./Photos/test.jpg show my-image | |
i wonder if set-values works ? | |
is missing a set-image ;-) | |
someone have a solution ? | |
rebgui 118 | |
iam stupid ;-) my-image/image: load-image %./Photos/test.jpg show my-image | |
Ashley 9-May-2010 [8717] | Replace 'load-image with 'load unless you want to cache the image. |
Claude 9-May-2010 [8718] | thanks Ashley, do you find a way to correct Build 218 and drop-list, menu etc.... ? |
Ashley 9-May-2010 [8719] | Bit of a hiatis while R3 comes closer to fruition, so no. |
Thorsten 22-May-2010 [8720x2] | Hi, |
I want to give Rebgui a try for an app i need to do. So, i need a tree in there, which should be filled from database request when the app starts. Not via button click. Can anybody give me a small example how to achive this. Searched the docs, but couldn't find something like that. And be kind with me as i am not too familiar with Rebgui till now. I downloaded build 218. What i tried so far is set-data via button, but that doesn't seem to work. A sample would drastically shorten my way to get this working. Thanks in Advance!! | |
Ashley 22-May-2010 [8722] | Tree is not a fully developed widget, so the easiest way of modifying it is to dynamically generate the spec. For example: blk: copy [] append blk ["Pets" ["Cat" "Dog"] "Numbers" [1 2 3]] display "Test" compose/only [tree data (blk)] |
Thorsten 22-May-2010 [8723x3] | Does this apply to regui 218?? I get an error, that display has no compose refinement! |
OK , my fault. Should have studied the example more precisely. Now it is working perfectly. Thanks for your assistance. | |
You say that tree is not fully developed. Can tell me, what limitations it has?? Is tree able to react on events, when i click on one of the branches of the tree?? | |
Ashley 23-May-2010 [8726] | Many widgets have accessor functions (e.g. add-row) that allow you to dynamically modify them. The tree widget lacks these but is fully functional in all other respects. |
Thorsten 23-May-2010 [8727] | Are there any plans to update the widget in the near future or do you have other priorities?? Can you tell me which of the widgets already have these accessors, to have a look at?? |
Pekr 23-May-2010 [8728] | Ashley - what is your status re RebGUI and its future? It seems to me, that R2 brach is not going to be further developed? And also - I noticed you mentioned some flawor of even more simplified RebGUI like engine for R3. Is this still a plan, or do you wait for how R3 VID emerges? |
Ashley 23-May-2010 [8729x2] | No immediate plans to update tree widget. For accessor functions, search for the word accessor in hhttp://www.dobeash.com/RebGUI/widgets.html |
what is your status re RebGUI and its future? ... RebGUI does most of what *I* need it to do at present, but I'd really prefer to be using R3 + SDK + Cool looking R3 GUI. I'm experimenting with a minimalist GOB-based R3 GUI, but it's more an intellectual pursuit to see how minamalist (and functional) I can get it ... so don't hold your breath. | |
Thorsten 24-May-2010 [8731] | I have a menu as the top widget in my window. I think i tried every possible combination of the sizing attributes (#LOV, #HW, margin, tight and space). The menu sizes to nearly the full width of the window but keeps a distance (seems like 4x4) from the rigth window border. Is there any explanation for this space on the right?? |
Ashley 24-May-2010 [8732] | See margin, tight and pad ... http://www.dobeash.com/RebGUI/user-guide.html#section-3.4 |
NickA 25-May-2010 [8733] | Thorsten, take a look at the point of sale application at http://re-bol.com/rebol_crash_course.html#section-5.14 |
older newer | first last |