Recent

Author Topic: Darwin Cocoa: Tabs don't show pictures  (Read 1680 times)

zoltanleo

  • Sr. Member
  • ****
  • Posts: 359
Darwin Cocoa: Tabs don't show pictures
« on: September 06, 2021, 11:34:40 pm »
Hi folks!

I am trying to display pictures on pagecontrol components tabs. I don't succeed it for Darwin, in other OS the pictures are displayed correctly.
It's a bug?
Win10 LTSC x64/Deb 11 amd64/Darwin Cocoa (Big Sur):
Lazarus x32/x64 2.3(trunk); FPC 3.3.1 (trunk), FireBird 3.0.7

Sorry for my bad English, I'm using translator ;)

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1621
  • Former Delphi 1-7, 10.2 user
Re: Darwin Cocoa: Tabs don't show pictures
« Reply #1 on: September 07, 2021, 03:19:28 am »
If you look at the Apple Cocoa documentation for NSTabView you will note that there is no facility for including an image in a tab.
Lazarus 2.3 2021-08-10 FPC 3.3.1 r49223 macOS 10.14.6 Xcode 11.3.1
Lazarus 2.3 + FPC 3.3.1 24 Sep 2021 macOS 11.6 aarch64 Xcode 13
Lazarus 2.3 2021-08-11 FPC 3.2.2 FreeBSD 13.0 amd64 VMware VM
Lazarus 2.1 r61574 FPC 3.0.4 Ubuntu 20.04 Parallels VM
Lazarus 2.0.10 FPC 3.2.0 Win10 Parallels VM

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2711
    • havefunsoft.com
Re: Darwin Cocoa: Tabs don't show pictures
« Reply #2 on: September 07, 2021, 08:50:27 am »
trev is right not quite right. 

NSTabViewItem is responsible for the page control tabs. There's a property added for an image... however, it's only available for macOS 10.10 (and was never implemented originally)

It's also need to note, that masOS design guildelines doesn't even mention the possibility of having an image on the tabview.

Instead the use of "label" is encouraged.
« Last Edit: September 07, 2021, 09:03:00 am by skalogryz »

zoltanleo

  • Sr. Member
  • ****
  • Posts: 359
Re: Darwin Cocoa: Tabs don't show pictures
« Reply #3 on: September 07, 2021, 09:39:43 am »
@trev
@skalogryz

Thank you for your answers and patience.  Makos is a completely new system for me.  Therefore, I will always be grateful for additional information.
Win10 LTSC x64/Deb 11 amd64/Darwin Cocoa (Big Sur):
Lazarus x32/x64 2.3(trunk); FPC 3.3.1 (trunk), FireBird 3.0.7

Sorry for my bad English, I'm using translator ;)

 

TinyPortal © 2005-2018