anthonyt@sal15.usc.edu (Anthony Tieu) (11/30/88)
Hello, I am learning how to program using the toolkit with X-Windows. If this sounds too trivia to some of you, please forgive me. I am working on a calculator program and would like to changed the displayed value as the user clicks on the number buttons. I am currently using the labelWidget to display the numbers. I have tried using XtGetValues, XtSetArg, and XtSetValues, but was unable to succeed. If anyone can help, I would appreciated. Thanks.
lasslo@hpcupt1.HP.COM (Richard Lasslo) (12/02/88)
> I am learning how to program using the toolkit with X-Windows. >If this sounds too trivia to some of you, please forgive me. >I am working on a calculator program and would like to changed >the displayed value as the user clicks on the number buttons. I am >currently using the labelWidget to display the numbers. I have tried >using XtGetValues, XtSetArg, and XtSetValues, but was unable to succeed. I did a calculator program with widgets and used statictext widgets to display the numbers. I used XtSetValues to change the numbers. Also I put a frame widget around the static text widget to get a realistic looking calculator. Good Luck
kit@athena.mit.edu (Chris D. Peterson) (12/02/88)
> I am working on a calculator program and would like to changed > the displayed value as the user clicks on the number buttons. Sound like what you want it is a Command widget, not a Label widget. The Label widget is intended only for displaying text, not for retrieving user input. Chris D. Peterson Project Athena Systems Development Net: kit@athena.mit.edu Phone: (617) 253 - 1326 USMail: MIT - Room E40-342C 77 Massachusetts Ave. Cambridge, MA 02139
atieu@skat.usc.edu (Anthony Tieu) (12/10/88)
I am using a label widget to display a string. Whenever I change the string (making it longer or shorter), the label widget automatically resize the width and height of the widget to fit the string. Is there a way, using the XToolkit or the X-lib, to make the width and height of a label widget fix? Thanks Anthony Tieu
rlh2@ukc.ac.uk (Richard Hesketh) (12/11/88)
In article <13900@oberon.USC.EDU> atieu@skat.usc.edu () writes: >I am using a label widget to display a string. [..] The R3 Label Widget has an added resource, XtNresize, which when set to FALSE causes the widget not to resize itself to its preferred size during an XtSetValues call. >Anthony Tieu Richard Hesketh