Newbie Question 
Author Message
 Newbie Question

I have written an educational game in TCL / Snack and it is working well.  I
would like to clena it up a bit and can't figure out 2 thing if anyone could
help I would appreciate it.

1. How can I change the title of the main window other than renaming the
program

    The program is called Flash.tcl so the toplevel window . is titled Flash
    I would like to call it something else like "Spelling Flashcards"

2.  When the user gets one right (or wrong) a new toplevel pops up with
either a happy or sad face

    This is titled .f.good or .f.bad - obviously I would like it to say
something like
    Correct or Wrong - or even better I would just like the image to pop up
(and a button that I created to detroy the new toplevel window) with no
Title bar at all

Thanks in advance for your help

ErMac!



Sat, 08 Mar 2003 03:00:00 GMT  
 Newbie Question

Quote:

> I have written an educational game in TCL / Snack and it is working well.  I
> would like to clena it up a bit and can't figure out 2 thing if anyone could
> help I would appreciate it.

> 1. How can I change the title of the main window other than renaming the
> program

>     The program is called Flash.tcl so the toplevel window . is titled Flash
>     I would like to call it something else like "Spelling Flashcards"

wm title . "Spelling Flashcards"

Quote:
> 2.  When the user gets one right (or wrong) a new toplevel pops up with
> either a happy or sad face

>     This is titled .f.good or .f.bad - obviously I would like it to say
> something like
>     Correct or Wrong - or even better I would just like the image to pop up
> (and a button that I created to detroy the new toplevel window) with no
> Title bar at all

wm title .f.good "Correct"
wm title .f.bad "Wrong"

Alternatively you could do something like:

toplevel .f.good
# Create image in .f.good
wm overrideredirect .f.good 1
button .f.good.dismiss -command [list destroy .f.good]
pack .f.good.dismiss
....

--Dan



Sat, 08 Mar 2003 03:00:00 GMT  
 Newbie Question
Thanks very much

ErMac_


Quote:

> > I have written an educational game in TCL / Snack and it is working
well.  I
> > would like to clena it up a bit and can't figure out 2 thing if anyone
could
> > help I would appreciate it.

> > 1. How can I change the title of the main window other than renaming the
> > program

> >     The program is called Flash.tcl so the toplevel window . is titled
Flash
> >     I would like to call it something else like "Spelling Flashcards"

> wm title . "Spelling Flashcards"

> > 2.  When the user gets one right (or wrong) a new toplevel pops up with
> > either a happy or sad face

> >     This is titled .f.good or .f.bad - obviously I would like it to say
> > something like
> >     Correct or Wrong - or even better I would just like the image to pop
up
> > (and a button that I created to detroy the new toplevel window) with no
> > Title bar at all

> wm title .f.good "Correct"
> wm title .f.bad "Wrong"

> Alternatively you could do something like:

> toplevel .f.good
> # Create image in .f.good
> wm overrideredirect .f.good 1
> button .f.good.dismiss -command [list destroy .f.good]
> pack .f.good.dismiss
> ....

> --Dan



Tue, 11 Mar 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Newbie Question (Was: Newbie Question...)

2. Not a newbie, but a newbie question...

3. Trivial Newbie Question (Newbie)

4. Newbie Question: Realbasic Question

5. Yet another question on system calls(newbie question)

6. A few more newbie questions..

7. Newbie question about worth of specializing in Smalltalk

8. Very Newbie questions

9. Newbie question

10. newbie questionS

11. Another Newbie Question

12. newbie question

 

 
Powered by phpBB® Forum Software