summaryrefslogtreecommitdiffstats
path: root/doc/treectrl.man
diff options
context:
space:
mode:
authortreectrl <treectrl>2005-05-23 21:32:48 (GMT)
committertreectrl <treectrl>2005-05-23 21:32:48 (GMT)
commit815149504a1d9ee231974b6f36dbb595c4b7f2bc (patch)
tree7bb8ead4f0905412d12a05f61ada809f76b844eb /doc/treectrl.man
parent181ae5ce61deef3c430de5973b8740e320dc0c8f (diff)
downloadtktreectrl-815149504a1d9ee231974b6f36dbb595c4b7f2bc.zip
tktreectrl-815149504a1d9ee231974b6f36dbb595c4b7f2bc.tar.gz
tktreectrl-815149504a1d9ee231974b6f36dbb595c4b7f2bc.tar.bz2
Added -columnprefix and -itemprefix options.
Added "column dragcget" and "column dragconfigure" commands. Added all the dynamic events generated by the library scripts. Added example of <ColumnDrag-receive>.
Diffstat (limited to 'doc/treectrl.man')
-rw-r--r--doc/treectrl.man122
1 files changed, 119 insertions, 3 deletions
diff --git a/doc/treectrl.man b/doc/treectrl.man
index dc7eb5d..3b1a168 100644
--- a/doc/treectrl.man
+++ b/doc/treectrl.man
@@ -3,7 +3,7 @@
See the file "license.terms" for information on usage and redistribution
of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- $Id: treectrl.man,v 1.17 2005/05/22 19:00:30 treectrl Exp $}
+ $Id: treectrl.man,v 1.18 2005/05/23 21:32:49 treectrl Exp $}
][manpage_begin treectrl n 2.0]
[moddesc {Tk Commands}]
[titledesc {Create and manipulate hierarchical multicolumn widgets}]
@@ -114,6 +114,13 @@ Specifies the width of the outline and the plus or minus sign
of the button to the left of an item
in any of the forms acceptable to [fun Tk_GetPixels].
+[tkoption_def -columnprefix columnPrefix ColumnPrefix]
+Specifies an ascii string that changes the way column ids are reported and
+processed. If this option is a non-empty string, the usual integer value
+of a column id is prefixed with the given string. This can aid debugging
+but it is important your code doesn't assume column ids are integers if you
+use it.
+
[tkoption_def -columnproxy columnProxy ColumnProxy]
If this option specifies a non empty value,
it should be a screen distance
@@ -166,6 +173,13 @@ The default is 0, which means that
every item has the height requested by the arrangement of elements
in each column. Items are never shorter than the maximum height of a button.
+[tkoption_def -itemprefix itemPrefix ItemPrefix]
+Specifies an ascii string that changes the way item ids are reported and
+processed. If this option is a non-empty string, the usual integer value
+of an item id is prefixed with the given string. This can aid debugging
+but it is important your code doesn't assume item ids are integers if you
+use it.
+
[tkoption_def -linecolor lineColor LineColor]
Specifies the color which should be used for drawing
the connecting lines between related items.
@@ -421,8 +435,51 @@ of the new column.
Deletes the specified [arg column] from the treectrl widget. If [arg column]
is the string [const all], all columns except the tail column are deleted.
+[call [arg pathName] [cmd {column dragcget}] [arg option]]
+[call [arg pathName] [cmd {column dragconfigure}] \
+ [opt [arg option]] [opt [arg value]] [opt [arg {option value ...}]]]
+The user can move a column within a treectrl by drag-and-drop. Feedback consists
+of a semi-transparent photo image of the header of the column being dragged
+and a 2-pixel-thick vertical line to indicate where the column may be dropped.
+The drag image consists of a colored background rectangle plus the image and/or
+text displayed in the column header. The 2-pixel-thick line will be drawn
+over the left edge of the column before which the dragged column may be dropped.
+[nl]
+
+The library scripts generate a <ColumnDrag-accept> event when the user has
+successfully drag-and-drop'd a column. You will have to bind a script to this
+event if you want to move the dragged column.
+[nl]
+
+The following configuration options are supported:
+[list_begin opt]
+[opt_def [option -enable] [arg boolean]]
+Controls whether the user is allowed to rearrange columns by drag-and-drop.
+
+[opt_def [option -imagealpha] [arg alpha]]
+[arg Alpha] is an integer from 0 (invisible) to 255 (opaque) controlling the
+transparency of the drag image. Any value outside this range is clipped.
+
+[opt_def [option -imagecolor] [arg background]]
+[arg Background] is the color of the drag image background rectangle.
+
+[opt_def [option -imagecolumn] [arg column]]
+[arg Column] specifies the column to create the drag image from.
+
+[opt_def [option -imageoffset] [arg offset]]
+[arg Offset] is the horizontal screen distance the drag image is offset from its
+starting position.
+
+[opt_def [option -indicatorcolor] [arg color]]
+[arg Color] is the color of the 2-pixel-thick line.
+
+[opt_def [option -indicatorcolumn] [arg column]]
+The 2-pixel-thick line will be drawn over the left edge of [arg column].
+
+[list_end]
+
[call [arg pathName] [cmd {column index}] [arg column]]
-Deprecated. Use [cmd {column id}]
+Deprecated. Use [cmd {column id}] instead.
[call [arg pathName] [cmd {column id}] [arg column]]
This command resolves the column description [arg column] into a unique column
@@ -2530,7 +2587,56 @@ how the selection changed.
[section {DYNAMIC EVENTS}]
In addition to the pre-defined static events such as <ActiveItem>
and <Selection>, new dynamic events can be created by using the
-[cmd {notify install}] command. The default bindings provide an example
+[cmd {notify install}] command.
+
+[para]
+The following events may be generated by the library scripts:
+
+[list_begin definitions]
+
+[lst_item [const <ColumnDrag-begin>]]
+[lst_item [const <ColumnDrag-receive>]]
+[lst_item [const <ColumnDrag-end>]]
+Generated whenever the user drag-and-drops a column header. The library scripts
+do not actually move a dragged column. You must bind to the receive event to
+move the column. See [sectref EXAMPLES].
+[list_begin opt]
+[opt_def %C] The column that was dragged
+[opt_def %b] The column to move the dragged column before
+[list_end]
+
+[lst_item [const <Drag-begin>]]
+[lst_item [const <Drag-receive>]]
+[lst_item [const <Drag-end>]]
+Generated whenever the user drag-and-drops a file into a directory. This
+event is generated by the filelist-bindings.tcl library code, which is not
+used by default. See the "Explorer" demos.
+[list_begin opt]
+[opt_def %I] The item that the user dropped the dragged items on.
+[opt_def %l] (lowercase L) The list of dragged items.
+[list_end]
+
+[lst_item [const <Edit-accept>]]
+The filelist-bindings.tcl code will display a text-editing window if the user
+clicks on a selected file/folder name. See the "Explorer" demos.
+[list_begin opt]
+[opt_def %I] The item containing the edited text element
+[opt_def %C] The column containing the edited text element
+[opt_def %E] The name of the edited text element
+[opt_def %t] The edited text
+[list_end]
+
+[lst_item [const <Header-invoke>]]
+Generated whenever the user clicks and releases the left mouse button
+in a column header if the column's -button option is true. You can bind a
+script to this event to sort the list.
+[list_begin opt]
+[opt_def %C] The column whose header was clicked
+[list_end]
+
+[list_end]
+
+The library scripts provide an example
of using a dynamic event called <Header-invoke>, which is generated when
the mouse button is released over a column header.
[example_begin]
@@ -2653,6 +2759,16 @@ Add the 10th child of the second child of the root item to the selection:
$T selection add "root firstchild nextsibling child 10"
[example_end]
+
+Move a column that the user drag-and-dropped:
+[example_begin]
+$T column dragconfigure -enable yes
+$T notify install <ColumnDrag-receive>
+$T notify bind MyTag <ColumnDrag-receive> {
+ %T column move %C %b
+}
+[example_end]
+
[see_also listbox(n) image(n) bitmap(n) bind(n) options(n)]
[keywords tree widget]
[manpage_end]