Ticket #47 (closed defect)

Opened 8 years ago

Last modified 4 years ago

wxTreeCtrl layout

Reported by: anonymous Owned by:
Priority: low Milestone:
Component: GUI-generic Version:
Keywords: Cc: vadz, hockkn
Blocked By: Patch: no
Blocking:

Description

Bug#: 116
Product: .wxWindows
Version: 2.2.0
Platform: wxGTK
OS/Version: Linux - RedHat
Status: NEW
Resolution:
Severity: enhancement
Priority: P2
Component: wxGTK
AssignedTo: ???
ReportedBy: br_9801@…
URL:
Summary: wxTreeCtrl layout

I'm writing an image browser in wxWindows using
wxGTK. I would like to set the icons associated
with each item in a wxTreeCtrl to images.

Unfortunately, wxTreeCtrl seems to insist on making
every item the same size. Furthermore, once the
items have grown to a particular size, they don't
seem to ever shrink.

This kind of behavior makes sense when the icons are
just tiny indicators of "directory" vs. "file", but
it doesn't look very good when images associated with
items have any kind of substantial size (say, 128x128).
It also doesn't work very well because when a bigger
icon gets defined for any item in the tree, all
items get resized and the contents of the tree control
move.

What I would like is for each item to just fit snugly
around its corresponding icon and text. For the
"traditional" case, where there are a bunch of small icons,
there could still be a SetMinimumItemSize call that ensures
that all items are the same size.

Change History

Changed 8 years ago by vadz

this will never be supported under MSW, so it's quite low priority

Changed 4 years ago by hockkn

wxTR_HAS_VARIABLE_ROW_HEIGHT added to generic control
at some point along the way since 2000. See also Vadim's
note.

Note: See TracTickets for help on using tickets.