Closed Thread
Results 1 to 2 of 2

Thread: Open multiple windows in Perl Tk

  1. #1
    terrylau is offline Newbie
    Join Date
    Jul 2009
    Posts
    6
    Rep Power
    0

    Open multiple windows in Perl Tk

    I've got a text file in this following format :

    Field Data
    1 2
    1 3
    1 4
    2 5
    2 6
    3 2
    3 3
    3 4

    I would like to open separate windows for each of the field...
    meaning :
    window1 (for field1) will display 2,3,4
    window2 (for field2) will display 5,6
    window3 (for field3) will display 2,3,4

    I've read the file and load into two separate arrays - @field and @data.

    I'm using window1 as the main window and the rest as toplevel windows.
    I've managed to do window1 but the still having problem to proceed with the rest. Appreciate any snippets or guidance to start with as still new with Perl n Tk. Thanks in advance...

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Aug 2009
    Location
    ~/
    Posts
    918
    Rep Power
    19

    Re: Open multiple windows in Perl Tk

    I believe your problem is with how Tk works,
    (my experience is limited to some tcl/tk and the Tkinter library in Python)

    With Tk you have only one root window from
    importing the Tk library, everything else is placed on it.

    I'm not sure what your trying to do, but if your just displaying data...
    Create a frame or multiple frames and put a text with scrollbar as many as you
    need and pack each frame with positional parameters.

    If you have to have multiple windows below root then look at this:
    TkDocs - Tk Tutorial - Windows and Dialogs

    Good Luck

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 05-31-2011, 02:31 PM
  2. multiple mysql servers on windows
    By itay in forum Database & Database Programming
    Replies: 5
    Last Post: 07-05-2010, 03:48 PM
  3. Batch file to open multiple text files at once using Notepad
    By terrylau in forum General Programming
    Replies: 3
    Last Post: 07-06-2009, 12:23 AM
  4. Perl Tutorial Course for Windows
    By priorityone in forum Perl
    Replies: 22
    Last Post: 02-10-2007, 10:57 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts