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

[REBOL] Re: Multiline text in face?

From: gscottjones:mchsi at: 19-Sep-2002 7:21

Hi, Robert and all other respondents, I guess life is a lot like Lewis Carroll's "Alice in Wonderland," do we say what we mean or mean what we say? Language is a fragile medium, and I am hardly the most articulate person on this list. Earlier respondents were demonstrating how to use the VID word 'as-is and layout to achieve the goal. I suspected that Robert was trying to get the behavior of 'as-is while using custom faces in View. Except for a typo, Robert was trying to do what Gabrielle was saying, but he was inadvertently doing it on the incorrect face (using the text path of the parent window, and not a child window; the text path of the main window is the title bar). Given that VID supplies reasonable default values (one of the better parts of object oriented programming paradigm), I tried to show how he could quickly and easily inherit all the fundamental aspects of a VID laid-out text element in a *child* window. It was not very elegant, and I wasn't happy with it. Jean-François showed that basic functionality could be achieved "more easily" than what I was thinking possible (thanks!), and I suspect that Gabrielle is trying to figure out why there is any confusion at all!!, but only suffered the "oversite" of not giving a full working example that helps those of us (namely, me!!!) see exactly how to do it. :-) As almost a side note, I am going to submit one more example that demonstrates what I initially wanted to do yesterday, and that is to inherit the bulk of the text style *without* using layout (it was easier than I thought). Some defaults still need to be adjusted, as is true whenever one avoids VID and layout. This example draws on the most essential aspects of what Jean-François and Gabrielle have said and shown. svv: system/view/vid mytext: "Hi^/Rebol^/OK" test-face: make face [ offset: 100x100 size: 200x200 pane: make select svv/vid-styles 'text [ text: mytext color: 142.128.110 size: 100x100 ] ] test-face/pane/size: size-text test-face/pane test-face/pane/size: test-face/pane/size + 4x4 test-face/size: test-face/pane/size + 4x4 view test-face --Scott Jones