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

Ally list having problems ???

 [1/2] from: mdb::gci::net at: 16-Oct-2000 12:12


Looks like Ally list is having problems... ======================================================
>>REBOL Alliance Members Only >>Sorry. You attempted to send email to the REBOL
<<quoted lines omitted: 6>>
>>[feedback--rebol--com] >>-SELMA
========================================================= (REPOSTING QUESTION TO REBOL list) Hello, The following code works as expected:
>> l1: layout [style long-btn button 200x20
[ long-btn "Long Button Text" [choose ["Long Choice Text1" "Long Choice Text2" "Long Choice Te xt3" ] none] [ ]
>> view l1
However the choice options didn't display correctly. I tried adding the style refinement to choose but i got the following error message?
>> l1: layout [style long-btn button 200x20
[ long-btn "Long Button Text" [choose/style ["Long Choice Text1" Long Choice Text2 "Long Cho ice Text3" ] none long-btn] [ ]
>> view l1
** Script Error: long-btn has no value. ** Where: choose/style ["Long Choice Text1" "Long Choice Text2" "Long Choice Text3"] none long-bt n
>> What is choose expecting? Help says it's an object?
Thanks in advance. Mike.

 [2/2] from: allen:rebolforces at: 17-Oct-2000 10:27


Hi Mike, It is a little confusing. But the style refinement in this case refers to the button (or other style) to inherit the style from. This "button" has to exist as a face object in the layout for it to work., 'choose also uses this style to set the offset. I couldn't figure out how to set a style in the way you were trying, even by using 'get-style and 'make-face it didn't seem possible. Anyway here is an example that provides the wider button style, which you were after ;Example 1 l1: layout [ style long-btn button 200x20 size 300x200 at 20x80 mnu: long-btn "Long Button Text" [ choose/style [ "Long Choice Text1" "Long Choice Text2" "Long Choice Text3" ] func [f a][print f/text] mnu ] ] view l1 Cheers, Allen K ;Example 2, sets offset and parent-window l1: layout [ style long-btn button 200x20 size 300x200 at 20x80 mnu: long-btn "Long Button Text" [ choose/style/window/offset [ "Long Choice Text1" "Long Choice Text2" "Long Choice Text3" "Long Choice Text3"] func [f a][print f/text] mnu l1 mnu/offset ] ] view l1

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted