Hi Jochen,
Jochen Riekhof wrote:
<snip>
> Unfortunately, the nm ( instance of NMCUSTOMDRAW) boundingRectangle
> deliveres always
> 0@0 extent: 16@0, regardless of the entry.
You can use ListView>>lvmGetItemRect:bounding: to get a valid
boundingRectangle for a row. If you want the boundingRectangle of a cell,
you will need to add the following method to ListView:
!ListView methodsFor!
lvmGetSubItemRect: index subItem: subIndex bounding: boundingValue
"Private - Retrieves information about the bounding rectangle for a subitem
in a list-view control. "
| rect |
rect := RECT new.
rect
left: boundingValue;
top: subIndex.
"LVM_GETSUBITEMRECT 4152"
(self
sendMessage: 4152
wParam: index
lpParam: rect) == 0
ifTrue: [^self errorInCommonControlCall: index].
^rect asRectangle! !
> Also I would like to add a column containing checkboxes at a later
> stage. Is this also possible?
Not sure, but Chris Uppal's ListTreeView
http://www.metagnostic.org/ is a
good example of using state images in a ListView.
Steve
--
Steve Waring
Email:
[hidden email]
Journal:
http://www.stevewaring.net/blog/home/index.html