On Thu, 10 May 2007, Roode, Eric wrote:
> Can Tkx (or Tcl in general) use custom-made Windows widgets developed
> in .NET and loaded via DLL?

I don't think you can do this.  There is a .NET binding for Tcl called
TclBridge that allows you to use .NET objects from Tcl, but I don't think
you can combine .NET widgets with Tcl widgets without some additional
C code hacking.

You can use .NET forms and stuff from Perl using PerlNET from the Perl
Dev Kit. The docs contain a trivial example to display a WinForms dialog:

http://aspn.activestate.com/ASPN/docs/PDK/7.0/PerlNET_overview.html#perlnet_overview_winforms

In general it will probably be easier to design the UI using Visual Studio
and one of the forms designers in C# or VB.NET.  You can still implement
the event callbacks in Perl using PerlNET with some creative hackery.

> I will say this about the documentation for Tkx and Tcl::Tk: They both
> seem to assume the programmer knows Tcl and/or is migrating from
> Perl/Tk. They seem to have little self-contained documentation for the
> programmer who is just starting out, or who is migrating from an
> incompatible toolset (e.g. Win32::GUI).

This is indeed a problem. Note that the Tcl::Tk module explicitly
tries to emulate the API of the old Tk module so that you can
continue to use the existing PerlTk books etc. Unfortunately the
implementation of Tcl::Tk covers only about 80% [1] of the existing
Tk APIs, so you will still run into areas where you need to figure
things out from the Tcl docs.

Cheers,
-Jan

[1] Beware that I essentially just made up this number based on a few
    comments I heard from people trying to use Tcl::Tk.

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to