Set TreeCtrl Width to the item with the Longest String Name

Hello,

Please how do I set the width of the TreeCtrl such that the item with the longest name is completely visible?

The attachment shows the TreeCtrl widget with the items not completely visible.

BR,

Austin

screenshot.PNG

austin aigbe wrote:

Please how do I set the width of the TreeCtrl such that the item with
the longest name is completely visible?
The attachment shows the TreeCtrl widget with the items not completely
visible.

You would have to go through the list of items and add up the widths
yourself. This is not something that applications typically do. You
wouldn't want the tree page to keep growing and growing and growing as
you opened more branches.

···

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

The tree.SetMinSize((1800,-1)) doesn’t seem to have any effect on the width.

···

On Monday, February 3, 2014 9:57:31 PM UTC+1, Tim Roberts wrote:

austin aigbe wrote:

Please how do I set the width of the TreeCtrl such that the item with

the longest name is completely visible?

The attachment shows the TreeCtrl widget with the items not completely

visible.

You would have to go through the list of items and add up the widths

yourself. This is not something that applications typically do. You

wouldn’t want the tree page to keep growing and growing and growing as

you opened more branches.


Tim Roberts, ti...@probo.com

Providenza & Boekelheide, Inc.

It seems from the screenshot that the treeCtrl is housed within a pane of
some other structure, and it is that pane that needs to be resized. Could
be?

···

On Mon, Feb 3, 2014 at 4:06 PM, austin aigbe <eshikafe@gmail.com> wrote:

The tree.SetMinSize((1800,-1)) doesn't seem to have any effect on the
width.