Re: Urgent ! place the Console Window inside the GUI
- From: "slebetman@xxxxxxxxx" <slebetman@xxxxxxxxx>
- Date: 25 Nov 2005 04:24:38 -0800
p.senthilkumaran@xxxxxxxxxxxxxx wrote:
> Hi Friends,
>
> I am developing GUI application in tcltk, i want the console window to
> be a part of my GUI,
> when we give "console show" the console window will be displaying
> behind the application,
> but i want it to be placed inside the GUI, as a part of the GUI, like
> debug window in vc++,
>
> i am waiting for the reply, if it is not too much of trouble to u, as
> this is the urgent one.
>
> thanks in advance
>
Does it HAVE TO BE the console? Or do you just want a tcl "command
line"?
For a command line, I usually use the following for debugging:
pack [text .con -yscrollcommand {.con.s set}] -fill both
pack [scrollbar .con.s -command {.con yview}] -fill y -side right
..con insert end ">"
bind .con <Key-Return> {
set command [.con get "end -1 lines" "end -1 char"]
set command [string trimleft $command "> "]
.con insert end [eval $command]
}
bind .con <KeyRelease-Return> {
.con insert end ">"
.con yview moveto 1
}
Of course, it can be more sophisticated such as displaying error
messages with bgerror and preventing you from deleting the prompt ">".
The above is just a simple stripped-down example.
.
- Follow-Ups:
- Re: Urgent ! place the Console Window inside the GUI
- From: Sektor van Skijlen
- Re: Urgent ! place the Console Window inside the GUI
- References:
- Urgent ! place the Console Window inside the GUI
- From: p . senthilkumaran
- Urgent ! place the Console Window inside the GUI
- Prev by Date: Urgent ! place the Console Window inside the GUI
- Next by Date: Re: Urgent ! place the Console Window inside the GUI
- Previous by thread: Urgent ! place the Console Window inside the GUI
- Next by thread: Re: Urgent ! place the Console Window inside the GUI
- Index(es):
Relevant Pages
|