- New calendar command mode.
- New gpnav command.
- New dropdown date selector grid widget.
- Extra pre-defined validations.
- New "trim" option for validations.
- New button "!+" widget option.
- New "-overrideredirect" option for GRIDPLUS window.
- New pre-defined optionset.
- gpset and gpselect modified to set values for "calendar" and "date" selector.
- Pressing the Enter key while a button is highlighted will now invoke the button command.
- New behaviour for validations when loosing focus to toplevel window.
- Fix various validation problems when validated field looses focus to a toplevel window.
- Fix problem with popup validation error messages in notebooks.
- Fix "num" validation pattern.
- Fixes "expected integer" font problem due to Tcl/Tk bug.


GRIDPLUS is a package intended to simplify GUI screen layout development for TCL/TK programmers. GRIDPLUS is the second in a series of packages aimed at producing a framework for development/distribution of "database" applications written in Tcl/Tk, but I feel that some of the packages may also be of more general interest. The first package ICONS, released 2002, was originally developed to be used with GRIDPLUS.GRIDPLUS is a "Grid" based GUI builder system which builds on, simplifies and extends the existing Tk grid manager. GRIDPLUS layouts are defined as a hierarchy of grids. Each cell in a grid consists of two elements. These will usually be a text label and some other widget such as an entry. It is also allowed to have just one element in a cell, or a cell which is empty. GRIDPLUS grids can also be stretched to neatly fill the cells in which they are positioned. While the GRIDPLUS grid can be used "native", GRIDPLUS commands/options exist to create grids of Buttons, Checkbuttons, Date-selectors, Dropdowns (comboboxes), Entries, Links, Menubuttons and Radiobuttons. All places where text can be displayed make use of the Tcl message catalogue facility.In fact GRIDPLUS is much more than an alternative to the grid geometry manager, it provides most, if not all, of the facilities required to build complete screens/windows. In many cases, using GRIDPLUS to code an application GUI will be quicker than using a "Visual" screen design tool. Although aimed at producing data entry/update/display form screens for database applications, it may be useful for other tasks.GRIDPLUS also includes the following features:-
- Scrollable text widget.
- Scrollable tablelist.
- Scrollable tree widget.
- Calendar style date display selector.
- Basic notebook type widget.
- Simple drop-down menus.
- Simple method to specify widget traversal order when using the TAB key to navigate the screen.
- A group facility to enable/disable groups of widgets and menu options.
- Facility to include non-GRIDPLUS widgets in groups.
- Simple pattern/procedure based entry validations.
- Works with toplevel windows.
- ...and much, much more.





RELEASE HISTORY:-
adavis (6th February 2009): GRIDPLUS 2.4 has been released and is available from:-http://www.satisoft.com/tcltk/gridplus2ENHANCEMENTS:- New much simpler/clearer syntax for Embedded Widget Grids.
- New "-spacestretch" option for widget and grid to specify which links between columns can stretch.
- New "-stretch" option for widget and grid to specify which column contents can stretch.
- New "-basename" option for grid to specify the basename for data items and commands.
- New "#style" widget option.
- New define command mode.
- New radiobutton groups facility.
- New window resizing facillity.
- New pack command mode to support resizing.
- New "-command" option for text to specify a command to be invoked when the content of the text widget is modified.
- gpselect to "see" the selected row for tablelist.
- It is no longer neccessary to name the widget ID for radiobuttons.
- All examples have been updated to use new syntax/facilities/recommendations.
- Examples 2, 4, 5 and 6 have been updated to demonstrate embedded widget grids.
- Example 7 has been updated to demonstrate resizing.
- Fix problem whereby popup validation error messages were not cleared properly for toplevel windows.
- Fix problem with popup validation error messages in notebooks.
- Fix date validations.
- Fix problem with entry popup edit menu in contained windows.
- Fix problem creating default label widgets for embedded grids.
- Fix problem setting dropdown using gpmap.
- Fix problem in widget displaying a label only column when default widget is button/link/menubutton.
adavis (27th May 2008): GRIDPLUS 2.3 has been released.ENHANCEMENTS:
- New "-columnformat" option for widget and grid to specify the width of the left and right elements of each column. This makes it possible to line up labels and widgets in separately created grids.
- New "-validatepopup" option to enable "pop-up" validation error messages.
- New "-validateauto" option for widget to determine whether entry validations are to be automatic or forced.
- New "-validate" option for tree and tablelist to invoke entry validations when a tree/tablelist node/row is selected.
- New facility to specify entry validation error messages for individual widgets.
- New "!@" widget option to specify that an entry may be null when a validation is specified. For example: "!@int" means entry may be null or integer.
- New "?!" widget option to set pop-up/balloon text to be same as validation error message.
- The "-entrycommand" option can be used to specify an event to be generated. This can be used to allow the enter key to "Tab" to the next field.
- The "-entrycommand" can now be set using the option database.
- New "-fixed" option for widget grid to specify maximum number of characters allowed in an entry field.
- New widget option for entry widgets to allow both display size and maximum number of characaters allowed to be specified for an individual widget.
- New "-topmost" option for window to determine whether a toplevel window will be the topmost window.
- New facility to allow accelerator keys for menus.
- New "-labelanchor" option for grid and layout to determine the position of the frame label text.
- New "Find" option added to text right-click pop-up menu.
- New gpfind/gpfind_dialog commands to perform find operations on text widgets.
- New gpcut/gpcopy/gppaste/gpclear commands to perform cut/copy/paste/clear operations on text and entry widgets.
- New Example "Text Editor" application. See: [1]
- When autogroup facility is in use the initial widget state is set to the opposite of the state specified for when the widget is modified. For example: If ">mygroup" widget option is specified the widget will be created as "disabled".
- The menu seprator can now be specified using "=" to be consistant with grid/layout. The old ("-") method still works.
- The menu command can now be specified using "~" to be consistant with widget. The old (".") method still works.
- Date validations now work for dates prior to 01/01/1970.
- Text right-click pop-up menu only shows "Copy" when created as "disabled".
- "{expand}" changed to "{*}" for Tcl8.5b1 and later.
- Fix problem with validations in contained windows.
- Notebook tab text now uses message catalogue.
- The text default font is set to "TkTextFont" to deal with font change in recent (production) 8.5 releases.
adavis (26th July 2007): GRIDPLUS 2.2 has been released.ENHANCEMENTS:
- New "-icons" option for tree to determine whether or not icons are displayed.
- The gpmap modified to map to a dropdown value (which makes much more sense!!).
- The window command mode has been modified so that (for a contained window) the "windowcommand" is invoked when a window of the same name already exists.
- Fixed container problem caused by latest Tcl/Tk release.
- Fixed layout edge padding problem for some layouts using spanned columns.
adavis (28th February 2007): GRIDPLUS 2.1 has been released.ENHANCEMENTS:
- New GRIDPLUS container command mode to create a frame which can contain toplevel windows.
- New gpselect command to select a tablelist row or tree node.
- New gpinsert command to insert a tablelist row or text line.
- The gpmap command can now also map array elements to GRIDPLUS widget values.
- The window command mode now has an "-in" option to put the window into a container.
- Variable Substitution now also works for the notebook layout.
- The text command mode now has an "-font" option to set the display font when not using tags.
- The -title option for the GRIDPLUS layouts with a name ending with ".main" no longer sets the window title.
- The Notebook now works in toplevel windows.
- The tablelist "-columnsort" now works.
adavis (10th October 2006): GRIDPLUS 2.0 has been released.GRIDPLUS2 is a Tile based version of GRIDPLUS. Whereas GRIDPLUS Version 1 has features to control widget style as well as window layout - GRIDPLUS2 assumes that the Tile style engine facilties will be used to control widget styles. GRIDPLUS2 instead provides significantly enhanced screen layout/desgin functionality which can further reduce the coding required to create the desired window/widget layout.One of the main enhancements is the new GRIDPLUS2 Widget Grid [2]. With GRIDPLUS1 it was only possible to create one type of widget in a particular Grid (Buttons, checkbuttons, entries etc.). In order to mix widgets in a Grid it was neccessary to create additional Grids for the other widget types and then "embed" them into a parent Grid. The new widget Grid allows all of the GRIDPLUS widget types to be mixed in the same Grid.There are many more changes and enchancements - See the GRIDPLUS2 Readme [3] for further details.
COMMENTS:-
RLH Why dependent on Tk 8.5? Who knows when that is coming out?adavis (10th October 2006): I started on GRIDPLUS2 a while back. Tcl/Tk 8.5 had been around for a while even then, and I assumed that it would be "stable" by the time GRIDPLUS2 was finished. Oh, how wrong I was...I'm not sure now how much "8.5" there is in GRIDPLUS2. By the time I'd have rooted it all out, re-written and tested it - 8.5 probably would be stable!!I'm sorry if this is a problem - but since Tile hasn't got to version 1.0 yet I guess it can all be considered experimental.RLH Not a "big" problem. I will just have to wait to use it is all. It looks great though. : )LV 2007 Dec 20 The wait for Tcl/Tk 8.5 is over!AET 01mar07 As usual, Adrian, A top-notch offering. A well thought out utility, and documentation that is exemplory. Thanks very much. I am still struggling to put together a database using GRIDPLUS, but will be porting it to GRIDPLUS 2 as soon as I can.
Ro March 3rd, 2007 Fantastic project! Currently resizable toplevels are not supported, but you can do it with "wm resizable .mytoplevel 1 1" if you really need to. I don't think it's necessary for these kinds of apps (database + well behaved windows apps) but it's interesting to know. Thanks Adrian for this superb package.
WHD The GRIDPLUS2 home page says that it's only been tested on Windows XP. Has anyone used it successfully on Linux?I didn't check each and every detail, but GRIDPLUS 2.4 works well on Linux (tested with ActiveTcl 8.6 on fluxflux Linux). -- Effe
MHo 2009-11-10:
- The new version, 2.5, should be noted and documented here...
- Can't get the tree to work: ERROR: Invalid file (C:/Programme/Tcl/lib/tcl8.5/tkIcons)
gpset .mytree2 {
/a
/a/b
/a/b/c
}This one does not work:gpset .mytree2 {
/a/b
/a/b/c
}Does this mean that trees always have to begin with the root element?adavis (16th November 2009): More generally, it is required that the parent for a node be created explicitly, unless the parent is the root.2009/12/05: More questions from MHo:
- In the tree widget, how do I get the horizontal scrollbar to work? -scroll x or -scroll xy don't work, only -scroll y works.
- If I specify -action single and -command test in a gridplus tree statement, how do I know which item gets clicked? It seems that the callback proc didn't get any arguments. Does some kind of %var substitution take place like with bind?
- The documentation states: ...Specifies text to be displayed for node (Must not begin with "+", ":" -or- "/").... But the various examples for gpset show that inserting entries like /a/b/c is perfectly ok...?
- When I was working on GRIDPLUS 2.5 the ttk treeview didn't support "X" direction scrolling. I tried it recently with Tcl 8.5.8 and it still didn't seem to work.
- The value of the array item for the tree will be set to the selected node. For example: If you created a tree called .mytree then the name of the node can be accessed as $(.mytree) - See "Selecting a Tree Node" in http://www.satisoft.com/tcltk/gridplus2/tree.html
- This applies when specifying alternative display text as a node option. By default, the last part of the nodename (after the last "/") is the text displayed for the node in the tree display. It is possible to specify alternative text - See "Setting Specific Text For a Node" in http://www.satisoft.com/tcltk/gridplus2/tree.html#tree-gpset
- Expanding and collapsing a node with the (space)-key does not trigger the callback, while klicking on the symbol does...
single/space {
bind $options(name).tree <Button-1> "after 1 [list ::gridplus::gpTreeSelect $options(name) .$window $options(-validate) [list $command]]"
bind $options(name).tree <space> "after 1 [list ::gridplus::gpTreeSelect $options(name) .$window $options(-validate) [list $command]]"
}...case to the "$options(-action)" switch in ::gridplus::gpTree will add an option (-action single/space) to implement this functionality. I will include this modification in the next GRIDPLUS2 release.nb 5th Feb. 2010Really good stuff Adrian I've been putting off doing a complex db/form app for awhile now due to "packing hell" that comes along with these forms.I'm blowing this app off like nothing with your package, bravo... If I'm not careful, I'm risking finishing it too early ;-)OTOH, Maybe I'm missing something obvious, I went through the docs but did not see anywhere a way to set the state of individual widgets (as opposed to the whole grid), e.g. set an entry to disabled.regardsadavis (5th February 2010): In GRIDPLUS2 there are a couple of ways to achieve this - depending on what you are trying to do.If you simply want to set the state of an individual widget when it is created you can use the "<" (create as disabled) or ">" (create as enabled) widget option. The GRIDPLUS2 documentation Example 1 uses this for the "ID" field.You can also use the Groups facility to enable/disable named groups of widgets.