Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-01

Mac OS X : ListView Icon view does not appear to work...

6 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

Hi all,
I'm on MacOS 10.4.11 on and Intel MacBook and it appears that ListViews do not work correctly in lvIcon mode.

I assign an ImageList to the ListView's LargeImages property, but it never appears at design time or run-time.
Also one you create ListView items via the IDE, there is a bug stopping you from resetting the ImageIndex at design time.
I can't confirm if this happens at run-time as nothing is being displayed.

Is this a known issue? Should I Mantis it?

Dominique Louis.

Reply by email

dmitry boyarintsev
to Unknown author
Is this a known issue? Should I Mantis it?

Carbon ListView does not allow to use anything but Report style. Icon can be "emulated" by creating a special control. I wonder if there's any standard control available.

Reply by email

Unknown author
to dmitry boyarintsev

Hi Dimitry,
Is that correct? How does the MacOS X Finder implement the Icon view then ( see screenshot attached to bug report -
http://bugs.freepascal.org/view.php?id=13060 )?
Also could you clarify what this "special control" is.

Thanks,

Dominique.

dmitry boyarintsev wrote
Carbon ListView does not allow to use anything but Report style. Icon can be "emulated" by creating a special control. I wonder if there's any standard control available.

Reply by email

dmitry boyarintsev
to Unknown author

Hello, Dominique.

I'm quite agree with you, that lvIcon-style interface is widely used by Mac OS X. But unfortunately, the API for using such Icon-style controls is not you are aware of any kind of
such controls in the Carbon Lib please let me know.

LCL ListView is based on Carbon Data Browser control: http://developer.apple.com/documentation/Carbon/Conceptual/display_databrowser/databrowser_intro/chapter_1_section_1.html It's designed table-view only. There's no way to switch the data browser to the Icon-like mode

So, there're three solutions, that I can think of: 1st) to create custom "special control", that would behave like Icon-style Finder.
2nd) there's an Icon-style control at the Carbon lib I'm not aware of. 3d) AFAIK, Finder is Cocoa application (starting from OSX 10.4). So it's highly probable, that Icon-like controls are available using Cocoa API. So it's possible to implement lvIcon mode using Cocoa controls.

Thanks,
Dmitry

Reply by email

Unknown author
to dmitry boyarintsev

Hi Dimiry,
I've just been looking at the apple developer website under Customizing Drawing and found this...

http://developer.apple.com/DOCUMENTATION/Carbon/Conceptual/display_databrowser/databrowser_tasks/chapter_3_section_13.html#//apple_ref/doc/uid/TP30000968-CH206-BEIDBGFA

Which then led me to this link...
http://developer.apple.com/DOCUMENTATION/Carbon/Conceptual/display_databrowser/databrowser_concepts/chapter_2_section_3.html#//apple_ref/doc/uid/TBD-BAJEJCIH

Where it states, under "What can be displayed"...
# Text. Columns with the display type kDataBrowserTextType display text in list view. For an example of a column that displays text, see Figure 1-3. # Icon and text. Columns with the display type kDataBrowserIconAndTextType display an icon with text next to it in list or column view. Your application provides the icon to draw in a cell and the text to draw next to the icon. For an example of a column that displays icon and text, see Figure 1-5.
# Icon. Columns with the display type kDataBrowserIconType display icons in list view. Your application provides the icon to draw in a cell. You can also provide other drawing information such as color and an icon transformation type.

So, if I'm not mistaken, it does support Icons, but it may need to be massaged via Customised Drawing...

I must confess I have not looked into the specifics or very deeply, so I could be totally wrong on the above or have misunderstood the problem.

Dominique.

dmitry boyarintsev wrote 9 lines
Hello, Dominique. I'm quite agree with you, that lvIcon-style interface is widely used by Mac OS X. But unfortunately, the API for using such Icon-style controls is not you are aware of any kind of such controls in the Carbon Lib please let me know. LCL ListView is based on Carbon Data Browser control:

http://developer.apple.com/documentation/Carbon/Conceptual/display_databrowser/databrowser_intro/chapter_1_section_1.html

Show quoted text 14 lines
It's designed table-view only. There's no way to switch the data browser to the Icon-like mode So, there're three solutions, that I can think of: 1st) to create custom "special control", that would behave like Icon-style Finder. 2nd) there's an Icon-style control at the Carbon lib I'm not aware of. 3d) AFAIK, Finder is Cocoa application (starting from OSX 10.4). So it's highly probable, that Icon-like controls are available using Cocoa API. So it's possible to implement lvIcon mode using Cocoa controls. Thanks, Dmitry

Reply by email

dmitry boyarintsev
to Unknown author
Show quoted text 5 lines
So, if I'm not mistaken, it does support Icons, but it may need to be massaged via Customised Drawing... I must confess I have not looked into the specifics or very deeply, so I could be totally wrong on the above or have misunderstood the problem.

These "#Icons" and #Icon and Text are used to be drawn in the table. The same as Small Icons are drawn in the lvReport. (AFAIK, the only difference between #Icons and #Icon and Text, is that #Icons uses a whole column, while #Icons and Text share the single column for both text and image).

I've googled at the apple mailling list, it seems that Apple has "Icon"-browser API hidden from developers. :)
http://lists.apple.com/archives/Cocoa-dev/2003/May/msg01350.html. At the end of the list NSMatrix is recommended to be used, i wonder is there's any "Matrix"-Control for Carbon.

Thanks,
Dmitry

Reply by email