Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: How to's

From: arolls:idatam:au at: 26-Oct-2001 15:00

See comments below.
> -----Original Message----- > From: Ammon Johnson [mailto:[ammonjohnson--yahoo--com]] > Sent: Friday, October 26, 2001 2:14 PM > To: [rebol-list--rebol--com] > Subject: [REBOL] Re: How to's > > Not directly as I would like to do. ;) > > a: make face [ > offset: 100x100 > size: 300x50 > ;there should be a way to do something like: > pane: make face [ > a: make face [ > pane: make face [ > text: "face_a's data" > font: make font [ > size: 20 > style: 'bold > ] > ] > ] > b: make face [ > pane: make face [ > text: "face_b's data" > font: make font [ > size: 20 > style: 'bold > ] > ] > ] > ] > ] > > but this doesn't seem to work. I know you can append to a > face that is > already made, but I want to make it with 'make 'face not with VID. > > Thanks!! > Ammon
Well then you are going to have to do a lot of work, adding the functionality to the face that you want. For instance, actually showing the text, instead of simply storing it in the text attribute as you have done above. There has to be some code in there that shows the text, otherwise it won't be shown. I suggest you do this, pane: make get-style 'label [...] or whatever style (button, field, title, h1 etc..) you want to use, or first make a template face, like this: template-face: make face [ size: 300x3000 offset: 300000x10000000000 etc etc... fonts, feels etc ] then you can use it multiple times as above, pane: make template-face [...] Note that your code above "works". :) It's just that it didn't do what you expected it to! Regards, Anton.