Recent

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

Josh

  • Hero Member
  • *****
  • Posts: 1195
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: 1719
  • 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 by KodeZwerg »

Josh

  • Hero Member
  • *****
  • Posts: 1195
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: 940
  • ..... 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.

Lazarus 3.99 (rev main_3_99-649-ge13451a5ab) FPC 3.3.1 x86_64-darwin-cocoa
Mac OS X Monterey

Josh

  • Hero Member
  • *****
  • Posts: 1195
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: 940
  • ..... 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.

Lazarus 3.99 (rev main_3_99-649-ge13451a5ab) FPC 3.3.1 x86_64-darwin-cocoa
Mac OS X Monterey

 

TinyPortal © 2005-2018