Recent

Author Topic: Crossplatform OwnerDraw  (Read 2540 times)

JimKueneman

  • Full Member
  • ***
  • Posts: 220
Crossplatform OwnerDraw
« on: November 29, 2014, 03:16:13 am »
Is there a component somewhere that I can mimic something like Tile view in the Windows Listview that works for Windows, OSX (Carbon), and Linux?

None of the Ownerdraw features seem to do anything in the Listview and Listbox in OSX (likely Linux, did not look)

Jim

VTwin

  • Hero Member
  • *****
  • Posts: 1215
  • Former Turbo Pascal 3 user
Re: Crossplatform OwnerDraw
« Reply #1 on: December 13, 2014, 04:43:14 pm »
I don't have an answer to your question, but am also trying to use TListView. The virtual mode with OwnerData = true is working, but as you note, the OwnerDraw methods don't work. I can't get any of these, or the Advanced versions, to fire:

OnDrawItem
CustomDraw
CustomDrawItem
CustomDrawSubItem

I'd also like to know of fixes, workarounds, or alternatives.

See also:

http://forum.lazarus.freepascal.org/index.php/topic,11783.msg59415.html

http://bugs.freepascal.org/view.php?id=18513

Cheers,
Frederick
« Last Edit: December 13, 2014, 05:03:46 pm by Frederick »
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.2
macOS 12.1: Lazarus 2.2.6 (64 bit Cocoa M1)
Ubuntu 18.04.3: Lazarus 2.2.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.2.6 (64 bit on VBox)

VTwin

  • Hero Member
  • *****
  • Posts: 1215
  • Former Turbo Pascal 3 user
Re: Crossplatform OwnerDraw
« Reply #2 on: December 13, 2014, 09:31:30 pm »
Using DrawGrid may be a solution if you need control over drawn items. It doesn't have the OS X look and feel, but works well.
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.2
macOS 12.1: Lazarus 2.2.6 (64 bit Cocoa M1)
Ubuntu 18.04.3: Lazarus 2.2.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.2.6 (64 bit on VBox)

 

TinyPortal © 2005-2018