How to skin a dynamically created Popup-Menu?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #71451
    Watsch
    Participant

    Hi there,

    I have created a new Button component which is skinned as it should. This button has a dynamically created Popup-Menu component assigned, which however is not being skinned at all. The Popup-Menu component is created within the Button-component source and attached to the button. Everything works as it should, apart from the Popupmenu not being skinned.

    I already tried to use it with the SkinManager, but this doesn’t work either.

    Any help would be appriciated.

    Best regards,

    Watsch

    Btw, I am using the latest version of AlphaControls, Delphi 10.4

    #71452
    Andy Bell
    Participant

    You need to call this before displaying the menu:

    SkinManager1->SkinableMenus->HookPopupMenu(PopupMenu1, true);

    If you are dynamically creating the menu’s items in OnPopUp then add the code there. Otherwise, it probably will work in the form’s OnShow event…

    (This is C++ Builder code, but I’m sure the delphi equivalent will be easy enough to figure out)

    Andy

    #71453
    Stephane Senecal
    Participant

    Is the property SkinnedPopups is True in the SkinManager.

    Stephane Senecal
    CIS Group
    Delphi programmer since 2001

    #71454
    Watsch
    Participant

    Hi there,

    First of all, thanks a million for your replys. I have tried both of it before, but did not succeed. So, I changed my component and assign a PopupMenu component during Designtime to my component and that works perfectly fine. That PopupMenu ist skinned as it should.

    Anyways, I have attached my own components (only 6 so far and Delphi only, sorry) in case you want to have a look and have ideas for improvement. I will definetely try to create more additional components.

    Best regards,

    Watsch

    Attachments:
    You must be logged in to view attached files.
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.