Does wxLIST_AUTOSIZE work?

In the documentation it says that: "wxLIST_AUTOSIZE will resize the column
to the length of its longest item". But when I try to do it nothing happens

list.SetColumnWidth(0, wxLIST_AUTOSIZE)

Is this a bug?

Cheers,
Thomas

This works for me on Windows (Win2K) and Linux (RH9) with wxPython
2.4.1u.

I use both wxLIST_AUTOSIZE and wxLIST_AUTOSIZE_USEHEADER. You'll need
to determine which is longer and use the appropriate modifier.

Are you using the style wxLC_REPORT on your list?

···

On Thu, 2003-11-20 at 08:36, Thomas Aanensen wrote:

In the documentation it says that: "wxLIST_AUTOSIZE will resize the column
to the length of its longest item". But when I try to do it nothing happens

list.SetColumnWidth(0, wxLIST_AUTOSIZE)

Is this a bug?

Cheers,
Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org

--
Jim West
CheckLogix -a Concord company
102 S. Tejon Ste 920, Colorado Springs, CO 80903
719.633.7005 x223 Fax: 719.633.7006 Cell: 719.660.5676

This works for me on Windows (Win2K) and Linux (RH9) with wxPython
2.4.1u.

I use WinXP with wxPython 2.4.2.4

I use both wxLIST_AUTOSIZE and wxLIST_AUTOSIZE_USEHEADER. You'll need
to determine which is longer and use the appropriate modifier.

What du you mean by "determine which is longer"? Isn't that what's supposed
to be done automatically?
Modifier?

Are you using the style wxLC_REPORT on your list?

Yes.

- Thomas -

> This works for me on Windows (Win2K) and Linux (RH9) with wxPython
> 2.4.1u.

I use WinXP with wxPython 2.4.2.4

> I use both wxLIST_AUTOSIZE and wxLIST_AUTOSIZE_USEHEADER. You'll need
> to determine which is longer and use the appropriate modifier.

What du you mean by "determine which is longer"? Isn't that what's supposed
to be done automatically?
Modifier?

  The modifier wxLIST_AUTOSIZE sizes the column based on data in that
column. The modifier wxLIST_AUTOSIZE_USEHEADER sizes the column based
on the length of the header text.

  Yes, it would be nice if the listCtrl would automagically figure out
which one to use, but alas, it doesn't appear to do so.

···

On Thu, 2003-11-20 at 09:59, Thomas Aanensen wrote:

> Are you using the style wxLC_REPORT on your list?

Yes.

- Thomas -

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org

--
Jim West
CheckLogix -a Concord company
102 S. Tejon Ste 920, Colorado Springs, CO 80903
719.633.7005 x223 Fax: 719.633.7006 Cell: 719.660.5676

Thomas Aanensen wrote:

This works for me on Windows (Win2K) and Linux (RH9) with wxPython
2.4.1u.

I use WinXP with wxPython 2.4.2.4

I use both wxLIST_AUTOSIZE and wxLIST_AUTOSIZE_USEHEADER. You'll need
to determine which is longer and use the appropriate modifier.

What du you mean by "determine which is longer"? Isn't that what's supposed
to be done automatically?
Modifier?

Are you using the style wxLC_REPORT on your list?

Yes.

Does it already have data when you call SetColumnWidth? (It only looks for the widest item at the time of the call, not continuosly.) Also, I think it only works if you don't use the wxLC_VIRTUAL style.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!