home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.tcl
- Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!uunet.ca!unilabs!chare
- From: chare@unilabs.uucp (Chris Hare)
- Subject: new user questions
- Message-ID: <1992Nov11.141619.743@unilabs.uucp>
- Organization: UniLabs Research Group
- Date: Wed, 11 Nov 1992 14:16:19 GMT
- Lines: 107
-
- Here are some more new user (new to X and tcl/tk) questions:
-
- Q. 1
- I want to create a display which has three distinct sections: left right and
- bottom
- i.e.
-
- +-------------------------------------+
- | |button |
- | listbox |button |
- | |button |
- | |button |
- | |button |
- | |button |
- +-------------------------------------+
- |label |
- |text entry widget |
- +-------------------------------------+
-
- I can get the listbox and the buttons to show up correctly, but not the
- bottom frame which contains the label and extry widget. The bottom frame is
- drawn between the left and right frames.
-
- How do I fix this?
-
- Q. 2
- How do I turn off the icon button for child windows ( or I guess more
- apropriately, how I create a window without the toplevel command )
-
- Q. 3
-
- How do I find out what item is selected in the list box?
- What about the eentry box?
-
- Q. 4
- How do I set a double-click on a selection to invoke an action?
-
- Q. 5
- I also need to create a non-editable display which looks like this:
-
- Price Details
- Category : test
- Product :
- Prices Quantity
- Retail : 100.00 On Hand : 10
- Reseller : 100.00 Committed : 8
- Other : 100.00 On Order : 30
- Replace : 100.00 On Back Order : 27
-
- I can create this as a message, which is OK, but the text isn't lined up in
- any reasonable sense. I thought about creating a bunch of label widgets to
- stuff the data in, but then I have the same problem as Q.1 above.
-
- This is what I want it to look like:
-
- +--------------------------------------------+---------+
- | Price Details |Next |
- | Category : |---------+
- | Description : |Prev |
- +--------------------------------------------+---------+
- |Prices |Quantity |Close |
- +--------------------------------------------+---------+
- |Retail | 000000.00 |On Hand | 0000 |Close All|
- |Reseller | 000000.00 |Committed | 0000 |---------+
- |Other | 000000.00 |On Order | 0000 | Quit |
- |Replace | 000000.00 |On Back Order | 0000 | |
- +--------------------------------------------+---------+
-
- Q. 6
- I want to show an initializing box beofre the main window is brought up.
- The code is their, but it is never seen. Why?
-
- Q.7
- I also have an errorDialog box which is to be shown if there is a startup
- file which can't be found. the code is there, but the box is never seen.
- This is the code for that dialog. The stdout message is printed, so I knwo
- that the procedure is being executed. There is no error message.
-
- proc errorDialog { message } {
- global app_name
- toplevel .err -class Dialog
- wm title .err "$app_name : Error!"
- puts stdout "inside errorDialog"
-
- frame .err.top -relief raised -border 1
- frame .err.bottom -relief raised -border 1
-
- button .err.bottom.ok -text OK -command {exit} \
- -font -Adobe-helvetica-medium-r-normal--*-14*
-
- label .err.top.msg -text "ERROR: $message" \
- -font -Adobe-helvetica-medium-r-normal--*-14*
-
- pack append .err.bottom .err.bottom.ok {fill}
- pack append .err.top .err.top.msg {fill}
- pack append .err .err.top { top fill } \
- .err.bottom { bottom fill }
-
- }
-
-
-
- thanks for your help!
- --
- ???? --- It Always works for me! ---
- Chris Hare, UNIX Scientist Preferred : chare@unilabs.org
- Just a mild-mannered consultant by day ....
-