OK, does the justify option not work in the BWidget MessageDlg?
Whether I do
MessageDlg .msgdlg -parent . -message "Why doesn't\nthis thing work?" -type ok -justify center -icon info
or even
MessageDlg .msgdlg -parent . -message "Why doesn't
this thing work?"...
...better way to perform a command when the textvariable of an entry is modified?
Actually, I guess I could do a key bind. I'm sure I rejected that for some reason though.. Right. As far as I could see, you can only bind an event to a *specific* key..
But.. seems like you know more than...
...this works fine:
set entryspace "Initial"
entry .e -textvar entryspace -validate key -validatecommand "set wack 1"
set head "Line header:"
set inline "Line header: entry"
set yap [regexp "$head ?(.*)$" $inline match temp]
set entryspace $temp
...entry .e -textvar entryspace -validate key -validatecommand "set wack 1"
set head "Line header:"
set inline "Line header: entry"
set yap [regexp "$head ?(.*)$" $inline match entryspace]
I have copied this into wish as is, and it blows up.
Hmm.. that's interesting.. when I have a minute I'll make a small test program and see if I can re-create my bug..
I'm on 2000 with 8.3.4, so that's not why.. there must be another factor here..
I'll post again.
...entry .e -textvar entryspace
set head "Line header:"
set inline "Line header: entry"
set yap [regexp "$head ?(.*)$" $inline match entryspace]
does not work. It blows up as soon as you try to do the regexp. If you put in an intermediate variable, then set...
Uhh.. well, that doesn't exactly answer my question...
But I can tell you how to do the incorporation part. At least one way to do it.
If you want to run in from you C executable (rather than loading C packages into TCL/TK, which is somewhat easier, and documented all over the place, you've...
Hi all.. I'd like to find some way to allow a user to run a C program I've written with a TK GUI (I used Tk_Main to incorporate tk into my C code) without having to install TCL/TK. I thought this would be a simple matter of throwing some .dlls in the directory, but once I put in Tcl83.dll and...
OK. If you set /subsystem:windows in the linker options, it doesn't give you a console window. The downside is that for sooome reason, your entry point then has to be WinMain instead of Main. It has a different set of arguments, and more importantly - for me - I already need my main function...
I have basically the same problem. I'm doing all my I/O through TCL/TK, but the console window still pops up because everything's integrated into a C++ win32 console program..
I find it hard to believe that there's no way to hide the window without switching to a lesser compiler. Seems like...
Care to explain? This is a simple console application we're talking about. I have the same question. I don't want to bring in a bunch of windows stuff. None, ideally. I'd just like an application with no console window.
...you're me.) Basically what the linkvar function wants is a pointer to the string pointer.
Just in case anybody's actually reading this. =)
char *statusString = Tcl_Alloc(100 * sizeof(char));
char **statusStringPtr = (char **)Tcl_Alloc(sizeof(char *));
*statusStringPtr = statusString...
Just a note on the following:
/* RPB - No need for a cast before cArray here
* This allocates memory for size number of pointers
* to char
*/
cArray = malloc(size * sizeof(char *));
First, a lot of compilers won't *let* you cast the l-value. Second, I was doing...
...an interactive loop.
So if you want to avoid the loop, you can either enter the script as a command line arg to your C program, manually insert it *in* the program, or modify Tk_MainEx (which wouldn't be hard to do, but is undesirable..)
Now I just have to figure a way to insert a string...
...in order to get around this you have to create a pointer to the original string handle, like so:
char statusString[6] = "WHY??";
char *statusStringPtr = statusString;
Tcl_LinkVar(interp, "status", (char *)&statusStringPtr, TCL_LINK_STRING);
It was probably designed...
...link a C++ string to a TCL variable, and can't seem to do it. With the following code, I get strange behavior, such as the string being set to the *name* of the TCL variable. I assume I'm being an idiot and confusing the pointers or something, but I can't get it to work, and I'm starting to...
Hi. I'm trying to run a TK script from a c++ program using Tk_Main. It all works, but by default, Tk_Main creates an interactive shell. Instead, I just want to run a script (file), then exit. (So all I would get is the wish-like window, not the console. I've tried setting...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.