Skip to main content

Columnwidth in tree widget.

Author: i.sharp@pcisystems.co.uk (Iain Sharp)

When the tree widget list view column sizes are altered, it now fires an extended trigger called columnwidth. When I define the column sizes, using $fieldproperties("FIELD")="FORMATS=CL10·!CL25·!TC6·!TL17·!CL·!CL6·!TL17·!CL13·!CL25·!CL·!CL25·!CL·; LABELS=Reference·!Location·!CHS·!Due Date·!Owner·!Priority·!Date Last Amended·!Contact·!Stock Item·!Cus. Order Ref.·!Developer·!Tester" I have been using character counts. If I resize the 4th column in the tree the columnwidth trigger gets ID=3 (because 1st column is Id 0), and width=117. Does anyone have a good tip as to what one could do WITH this information to make it useful for the next time around, I'd like to store the user's preferences for column sizes and reset the column widths to those the next time, but I don't know a sane way to translate 117 (or whatever) to TL17? What do you do about part characters? Or is there a method of telling the $fieldproperties to reset the columns in pixels? If not, what's the point of this trigger? Confused

Columnwidth in tree widget.

Author: i.sharp@pcisystems.co.uk (Iain Sharp)

When the tree widget list view column sizes are altered, it now fires an extended trigger called columnwidth. When I define the column sizes, using $fieldproperties("FIELD")="FORMATS=CL10·!CL25·!TC6·!TL17·!CL·!CL6·!TL17·!CL13·!CL25·!CL·!CL25·!CL·; LABELS=Reference·!Location·!CHS·!Due Date·!Owner·!Priority·!Date Last Amended·!Contact·!Stock Item·!Cus. Order Ref.·!Developer·!Tester" I have been using character counts. If I resize the 4th column in the tree the columnwidth trigger gets ID=3 (because 1st column is Id 0), and width=117. Does anyone have a good tip as to what one could do WITH this information to make it useful for the next time around, I'd like to store the user's preferences for column sizes and reset the column widths to those the next time, but I don't know a sane way to translate 117 (or whatever) to TL17? What do you do about part characters? Or is there a method of telling the $fieldproperties to reset the columns in pixels? If not, what's the point of this trigger? Confused

Iain To answer you question about the columnwidth extended trigger, I see indeed that the tree communicates in pixels while the width is set in character cells. The easy way to handle the size is to use the $cellinfo. $cellinfo gives an associative list with the dimensions of a character cell in pixels. By deviding the width you get by the info you can store it and use it later again to setup the list view column width. I hope this helps Kind regards, Jasper de Keijzer


Author: Jasper (jasper.de.keijzer@compuware.com)

Columnwidth in tree widget.

Author: i.sharp@pcisystems.co.uk (Iain Sharp)

When the tree widget list view column sizes are altered, it now fires an extended trigger called columnwidth. When I define the column sizes, using $fieldproperties("FIELD")="FORMATS=CL10·!CL25·!TC6·!TL17·!CL·!CL6·!TL17·!CL13·!CL25·!CL·!CL25·!CL·; LABELS=Reference·!Location·!CHS·!Due Date·!Owner·!Priority·!Date Last Amended·!Contact·!Stock Item·!Cus. Order Ref.·!Developer·!Tester" I have been using character counts. If I resize the 4th column in the tree the columnwidth trigger gets ID=3 (because 1st column is Id 0), and width=117. Does anyone have a good tip as to what one could do WITH this information to make it useful for the next time around, I'd like to store the user's preferences for column sizes and reset the column widths to those the next time, but I don't know a sane way to translate 117 (or whatever) to TL17? What do you do about part characters? Or is there a method of telling the $fieldproperties to reset the columns in pixels? If not, what's the point of this trigger? Confused

 Jasper? Did you ever get anywhere with this, the same question just cropped up again here.    Regards,    Iain


Author: Iain Sharp (i.sharp@pcisystems.co.uk)