How do you get it to put buttons on one line
Posted: Thu Apr 13, 2006 1:06 pm
Hello,
I am very new to Newlisp.
I am trying to learn Newlisp and was trying to make a calculator program.
I was wondering how to I could get tk to diplay all the buttons on one line instead of putting the buttons on a new line? Here is my code:
(define (calc)
(tk "toplevel .mywin")
(tk "button .mywin.add -relief flat -overrelief raised -text ADD")
(tk "pack .mywin.add -padx 30 -pady 20")
(tk "button .mywin.subtract -relief flat -overrelief raised -text SUBTRACT")
(tk "pack .mywin.subtract -padx 30 -pady 20")
(tk "button .mywin.multiply -relief flat -overrelief raised -text MULTIPLY")
(tk "pack .mywin.multiply -padx 30 -pady 20")
(tk "button .mywin.divide -relief flat -overrelief raised -text DIVIDE")
(tk "pack .mywin.divide -padx 10 -pady 10")
)
I hope you can understand my question. Thanks for any help.
I am very new to Newlisp.
I am trying to learn Newlisp and was trying to make a calculator program.
I was wondering how to I could get tk to diplay all the buttons on one line instead of putting the buttons on a new line? Here is my code:
(define (calc)
(tk "toplevel .mywin")
(tk "button .mywin.add -relief flat -overrelief raised -text ADD")
(tk "pack .mywin.add -padx 30 -pady 20")
(tk "button .mywin.subtract -relief flat -overrelief raised -text SUBTRACT")
(tk "pack .mywin.subtract -padx 30 -pady 20")
(tk "button .mywin.multiply -relief flat -overrelief raised -text MULTIPLY")
(tk "pack .mywin.multiply -padx 30 -pady 20")
(tk "button .mywin.divide -relief flat -overrelief raised -text DIVIDE")
(tk "pack .mywin.divide -padx 10 -pady 10")
)
I hope you can understand my question. Thanks for any help.