World: r3wp
[View] discuss view related issues
older newer | first last |
[unknown: 10] 6-Mar-2006 [4405] | main: layout [] append main/pane [ something ] view main does not work..hehe ;-) any hints? its sooo simple probably.. |
Pekr 6-Mar-2006 [4406] | I would do it this way ... just try to probe main, it seems to be some whole VID :-) |
Robert 6-Mar-2006 [4407] | Sunanda, thanks for the link. Never found a tool where I could use a dialect to create a flow-chart. |
Pekr 6-Mar-2006 [4408x4] | main: make face [pane: copy []] append main/pane make face [text: "hello"] view main |
that is View without VID .... maybe it could be somehow "simplified", using VID ... | |
append main/pane make face layout [button "OK" [print "ok"]] | |
you get the idea ... | |
[unknown: 10] 6-Mar-2006 [4412x2] | aaa wait... its the 'make face that needs to go inside a layout ofcourse... |
yes yes.. i think thats it ;-) I forgot to do a make face of the bolck.. | |
Pekr 6-Mar-2006 [4414] | what block? |
[unknown: 10] 6-Mar-2006 [4415x5] | 'make face |
I simply forgot to put make face .. | |
but its oke now Thanks ! | |
I was just appending.. | |
with no gui ;-) | |
Pekr 6-Mar-2006 [4420] | eh, actually I did not think I could be helpful to you gurus regarding rebol coding :-) |
[unknown: 10] 6-Mar-2006 [4421] | haha... |
Anton 7-Mar-2006 [4422] | view layout [button area face with [init: [] size: 100x100 color: navy]] |
[unknown: 10] 7-Mar-2006 [4423x4] | Anton..intresting.. I see two things I actualy never use in Layouts (I mostly use Faces directly) that is the init: [] and 'with |
But i actualy like the felixibilty of 'layout function there are more ways to combine layout and make face ...intresting if your not like to reinvent /vid again ... | |
But actualy I wonder what the best way is to merge the use of Layout together ith 'make face.. Which is eating less overhead? | |
1) copying it all into a block and append 2) using make face layout inside a layout 3) using a layout with a make face with ?? | |
ChristianE 7-Mar-2006 [4427] | Hi Rebolinth, there's a compromise between the low-level MAKE FACE and the LAYOUT [] approach for single faces called MAKE-FACE. It's basically a way to create single faces using the VID style name and a spec block for of specifying facets. Of course, MAKE FACE should have the lowest overhead, whereas - just as it says - LAYOUT is more for describing whole layouts. You may find MAKE-FACE slightly easier to create VID-compatble faces without getting into too much detail. |
[unknown: 10] 7-Mar-2006 [4428x2] | Ah oke thanks for the explanation Christian.. Well Yes im using make face far more often in bigger programs/scripts where layout i use for the quick build of gui's.. |
Mmm i have asked this once befor but can someone explain to me when to use 'with ? | |
Ammon 7-Mar-2006 [4430] | When you want to assign facets that you can't assign with the dialect or any time you find it easier to assign facets using with than using the dialect. ;-) |
DideC 7-Mar-2006 [4431x2] | As ammon said : view layout [ vh1 "The text" vh1 with [text: "The text"] ] It's the same. |
With is nice i.e. to set the background color of a text style (where colors used in the dialect are assigned to font) : | |
Henrik 7-Mar-2006 [4433] | and everything in that block is equivalent to working with an object block, so you can put in functions, etc. and all the variables are bound to the face |
DideC 7-Mar-2006 [4434] | view layout [ vh1 "Text" blue vh1 "Text" with [color: blue] ] |
Allen 7-Mar-2006 [4435] | Also the facet does not need to already exist in the style, it can be used to add your own custom ones e.g view layout [button "click" with [squid: 3] [alert join "My squid is " face/squid] ] |
Henrik 8-Mar-2006 [4436x3] | I'm testing a tab button group with BTN look. What do you think? http://www.hmkdesign.dk/tabview.png |
the idea is for them to be toggles in a group, where only one of them can be selected. then there needs to be an easy method to perform some kind of action, such as selecting a mode or changing a layout in a pane | |
http://www.hmkdesign.dk/tabview2.png<-- how they would look selected | |
Anton 8-Mar-2006 [4439x2] | view layout [style group-tog tog [print [face/text]] with [related: 'default] group-tog "Anton" group-tog "Henrik" group-tog "other unpeeled vegetables"] |
(using the existing TOG style) | |
Henrik 8-Mar-2006 [4441x2] | anton, that's not the point of it |
the point is to have a button group that actually looks like a button group | |
Anton 8-Mar-2006 [4443x2] | Oh I see. |
view layout [style group-tog tog [remove find face/parent-face/pane face append face/parent-face/pane face print [face/text]] with [related: 'default] across space -5 group-tog "Anton" group-tog "Henrik" group-tog "vegetables"] | |
Henrik 8-Mar-2006 [4445] | not good enough :-) |
Anton 8-Mar-2006 [4446] | what's missing ? |
Henrik 8-Mar-2006 [4447x3] | well, first of all it's easy to tell that it's just buttons layered over eachother |
which makes it look crude and simple and unprofessional | |
I like the BTN style, but it's underused in VID for other applications, such as a tab button group | |
Anton 8-Mar-2006 [4450] | Change the space -5 to -2 and it looks better. |
Henrik 8-Mar-2006 [4451] | second, I use pane switching a lot and it's a hassle to write your own routines for that all the time. it should be much simpler. |
Anton 8-Mar-2006 [4452] | Just write a couple of functions, face-to-front and face-to-back and you can reuse them many times. |
Henrik 8-Mar-2006 [4453x2] | that's not the point either... |
The point is that it should be easy for everyone to do this. VID does not offer a standardized way to do this and you need to study how to switch layouts in panes, etc. It should work out of the box | |
older newer | first last |