Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: TPopupMenu with VCL Styles



Permlink Replies: 1 - Last Post: Apr 6, 2018 7:12 AM Last Post By: Heiner Breuer
Pascal Bellebou...

Posts: 21
Registered: 6/12/04
TPopupMenu with VCL Styles
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 9, 2018 8:55 AM
In our applications, we are using lots of TPopupMenu which are dropped on a TDataModule (using Delphi 10.2.2).
We are currently adding style support on our applications and these popup menus are not displaying correctly when images are set on items (blank caption/text).

After deep debbugging, we found out that "TSysPopupStyleHook.TSysPopupItem.Create" calls "GetVCLParentMenuItem" which look for a parent item in each components of each forms available on the screen.

The PopupMenus dropped on a TDataModule are not found here, leading to the issue.

As these methods are in private sub types, it will be hard to fix it, so if someone has a trick/clue to solve this, it would be nice !

Pascal
Heiner Breuer

Posts: 1
Registered: 5/10/02
Re: TPopupMenu with VCL Styles
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 6, 2018 7:12 AM   in response to: Pascal Bellebou... in response to: Pascal Bellebou...
Hi,

Good analysis!
We have just even the same problem. Therefore I have just updated to Delphi 10.2.3 but the problem is not fixed !

Pascal for the top Menu area you can include the free "vcl-styles-utils-master" . This will solve the problem. But it remains vor submenus in a TPopUpMenu

Greetings
Heiner

Pascal Bellebouche wrote:
In our applications, we are using lots of TPopupMenu which are dropped on a TDataModule (using Delphi 10.2.2).
We are currently adding style support on our applications and these popup menus are not displaying correctly when images are set on items (blank caption/text).

After deep debbugging, we found out that "TSysPopupStyleHook.TSysPopupItem.Create" calls "GetVCLParentMenuItem" which look for a parent item in each components of each forms available on the screen.

The PopupMenus dropped on a TDataModule are not found here, leading to the issue.

As these methods are in private sub types, it will be hard to fix it, so if someone has a trick/clue to solve this, it would be nice !

Pascal
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02