Menu

New widgets

2000-10-06
2002-03-01
  • Bill Saunders

    Bill Saunders - 2000-10-06

    Compunds:
    One of the items that I find difficult with Visual Tcl is defining new widgets.  I have used the "compound" function but with little success.  If a compound widget is a frame with lots of subwidgets, I find it difficult to have the subwidgets interract with each other.  I have been using the tkPriv.window variable to identify who got clicked on and then backtrack to find the other subwidgets.  This is bad.  If the "compunds" concept has power, we need to document it more.  Maybe write a how-to on it.  Send me/us any suggestions/comments on using compounds and I'll write them up as a howto.

    True Widgets: ie mclistbox
    I think it would be a great feature to be able to add new widgets at run time.  There should be a "Standard palette" and a "User palette".  The standard one has all of the standard wish, itcl, blt, and tix widgets.  The user palette has anything I add.  The widgets in the user palette should be just like the ones in the standard palette.  Ie they should have attributes that can be modified by Visual TCL.  Any suggestions on how to write things like mclistbox?  I'd like to take several of the pure tcl widgets and add them to Visual Tcl.  Again any suggestions/comments will be documented/written up as a howto.

     
    • Christian Gavin

      Christian Gavin - 2000-10-10

      Yes, compounds are missing a real "Object-oriented" feel. You can look at the "Horizontal split" compound for a way to communicate between subwidgets. Also, in the tutorial (Home Page) there is a description of what additional procedures you can use with compounds. A compound can have its own procedures as well as an initialization procedure.

      If you want to see how the mclistbox is implemented, look at the file lib_mclistbox.tcl (all the lib_*.tcl files are extension libraries, one contains the core Tk widgets, one contains [incr Tcl/Tk] widgets and one has support for BLT).

       
    • zhengkun

      zhengkun - 2002-02-23

      may i ask a extra question.The 'lib_itcl.tcl' need
      an package of itcl30 for visual tcl 1.2.2
      But i don't have a itcl30 package.
      How can I get it??
      If anyone has it,please sent it to zhengjiankun@263.net
      Thanks very much.

       
    • Christian Gavin

      Christian Gavin - 2002-03-01

      If using Linux, look on http://rpmfind.net they have tons of packages. Search for itcl.

      Or, install ActiveTcl 8.3.4 (http://www.activestate.com)

       

Log in to post a comment.