Alan Oswald wrote:
How do I set the size of a text box? Here's my code that I'm experimenting with. The problem is that the size of the text box is much larger than that of the input box.

http://www.mozart-oz.org/documentation/mozart-stdlib/wp/qtk/html/index.html

Set the width of the text box with the parameter 'width'. Another good trick is to let both the entry and the text box stick to their left and right columns, by specifying 'glue:we' in their description.

declare
[QTk]={Module.link ["x-oz://system/wp/QTk.ozf"]}
D HI W N HO S
D=td(title:"Factorial"
     lr(label(text:"Enter an integer")
        entry(handle:HI glue:we)
        button(text:"Ok" glue:w
               action:proc {$} N={HI get($)} in {HO set(N)} end
              )
        newline
        label(text:"You entered" glue:n)
        text(handle:HO glue:we width:10)
       )
    )
W={QTk.build D}
{W show}


Cheers,
raph

_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to