Recent

Author Topic: Custom PopUp Menu with Colors, Graphics etc.  (Read 1316 times)

Josh

  • Hero Member
  • *****
  • Posts: 1344
Custom PopUp Menu with Colors, Graphics etc.
« on: September 20, 2023, 10:46:36 pm »
Hi

I saw a post earlier in week about customizing popup menu, so I stripped down one of my apps where i have created this.
You may find it usefull, you can have colors for as many items as you wish, differnt fonts, font colors,when selected the color is lightened they have a slight gradient fill to them.
or you can have graphics as standard and selected for as many as you wish.

Hopefully you can follow the code, and hopefully it works on other platforms.
« Last Edit: September 20, 2023, 10:53:00 pm by Josh »
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2269
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Custom PopUp Menu with Colors, Graphics etc.
« Reply #1 on: September 21, 2023, 12:40:23 am »
Funny what you did with my very basic colorizing example  :-*
I am happy that is was usefull  :-*
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

Josh

  • Hero Member
  • *****
  • Posts: 1344
Re: Custom PopUp Menu with Colors, Graphics etc.
« Reply #2 on: September 21, 2023, 12:52:31 am »
Hi

The code I stripped from an App I done a few years back. not long after ownerdraw was added to tpopupmenu
It has since been replaced with a complete custon popup that is not based on TPopup ( unfortunately i can't  share this code )
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

madref

  • Hero Member
  • *****
  • Posts: 1078
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: Custom PopUp Menu with Colors, Graphics etc.
« Reply #3 on: September 22, 2023, 09:52:22 am »
why can't you share this code then?
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Main Platform:
--------------
Mac OS X Sonoma 14.7
Lazarus 3.99 (Lazarus 3.99 (rev main_3_99-2668-g6b352d830e) FPC 3.3.1 x86_64-darwin-cocoa)

Windows 10 Pro
Lazarus 3.99 (rev cbfd80ce39)

Josh

  • Hero Member
  • *****
  • Posts: 1344
Re: Custom PopUp Menu with Colors, Graphics etc.
« Reply #4 on: September 22, 2023, 10:28:23 am »
The Custom 'popup' was commissioned by a client and license is closed source.
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

madref

  • Hero Member
  • *****
  • Posts: 1078
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: Custom PopUp Menu with Colors, Graphics etc.
« Reply #5 on: October 04, 2023, 09:38:50 am »
But if you change a few lines it's not the same source anymore :)
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Main Platform:
--------------
Mac OS X Sonoma 14.7
Lazarus 3.99 (Lazarus 3.99 (rev main_3_99-2668-g6b352d830e) FPC 3.3.1 x86_64-darwin-cocoa)

Windows 10 Pro
Lazarus 3.99 (rev cbfd80ce39)

 

TinyPortal © 2005-2018