Jump to content

Recommended Posts

  • 1 month later...
Posted

Solution:

1. CustomCSS ->

.customTr .x-btn-split-right:after, .customTr .x-btn-split-left:after {
    background-image: none !important;
}

.customArrow {
    background-image: none !important;
    position: relative;
}

.customArrow:after {
    content: '\f0d7';
    font-family: FontAwesome, "Font Awesome 5 Free";
    font-weight: 900;

    position: absolute;
    right: 6px;
    top: 50%;
    margin-top: -6px;

    pointer-events: none;
}

2. 

procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  UniMenuButton1.JSInterface.JSConfig('cls', ['customTr']);
  UniMenuButton1.JSInterface.JSAddListener(
    'afterrender',
    'function(me){' +
    '   if (!me || me._customStyled) return;' +
    '   me._customStyled = true;' +

    '   if (me.arrowEl){' +
    '       me.arrowEl.addCls("customArrow");' +

    '       if (me.btnInnerEl){' +
    '           var color = me.btnInnerEl.getStyle("color");' +
    '           if (color){' +
    '               me.arrowEl.setStyle("color", color);' +
    '           }' +
    '       }' +
    '   }' +
    '}'
  );
end;

 

  • 2 weeks later...
Posted
On 3/31/2026 at 9:11 AM, Sherzod said:

Solution:

1. CustomCSS ->

.customTr .x-btn-split-right:after, .customTr .x-btn-split-left:after {
    background-image: none !important;
}

.customArrow {
    background-image: none !important;
    position: relative;
}

.customArrow:after {
    content: '\f0d7';
    font-family: FontAwesome, "Font Awesome 5 Free";
    font-weight: 900;

    position: absolute;
    right: 6px;
    top: 50%;
    margin-top: -6px;

    pointer-events: none;
}

2. 

procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  UniMenuButton1.JSInterface.JSConfig('cls', ['customTr']);
  UniMenuButton1.JSInterface.JSAddListener(
    'afterrender',
    'function(me){' +
    '   if (!me || me._customStyled) return;' +
    '   me._customStyled = true;' +

    '   if (me.arrowEl){' +
    '       me.arrowEl.addCls("customArrow");' +

    '       if (me.btnInnerEl){' +
    '           var color = me.btnInnerEl.getStyle("color");' +
    '           if (color){' +
    '               me.arrowEl.setStyle("color", color);' +
    '           }' +
    '       }' +
    '   }' +
    '}'
  );
end;

 

Hi...

How can we do the same with TUniPopupMenu?

Posted
55 minutes ago, mikromundo said:

How can we do the same with TUniPopupMenu?

Do you mean applying the same behavior to TUniPopupMenu? If so, which exact part are you referring to?

Posted

Using the same code example you sent, but it doesn't work for TUniPopUpMenu.

Could you create an example to apply rounding to a TUniPopUpMenu and, if possible, a "FADE" display effect for this menu?

Thank you in advance for your help.

Posted

Sherzod, if I have an item in the PopUpMenu that is disabled (Enabled=False)...

How can I make it so that when I hover the mouse over that item, the background color doesn't change?

Posted
On 4/10/2026 at 6:28 PM, mikromundo said:

if possible, a "FADE" display effect for this menu?

I’ve tested fadeIn/fadeOut, and it doesn’t seem to be the best approach for menus...

Posted
9 hours ago, Sherzod said:

image.png.d12f51aa3142f654db56ab62fd53d9ea.png

 

 

type
  TXPopupMenu = class(TUniPopupMenu)

  end;

 

procedure TMainForm.UniFormReady(Sender: TObject);
begin
  with TXPopupMenu(UniPopupMenu1).MenuControl.JSInterface do
  begin
    JSConfig('shadow', [False]);
    JSConfig('style', ['border-radius:20px']);
  end;
end;

 

Posted
11 hours ago, Sherzod said:

 

 

type
  TXPopupMenu = class(TUniPopupMenu)

  end;

 

procedure TMainForm.UniFormReady(Sender: TObject);
begin
  with TXPopupMenu(UniPopupMenu1).MenuControl.JSInterface do
  begin
    JSConfig('shadow', [False]);
    JSConfig('style', ['border-radius:20px']);
  end;
end;

 

Thanks...and about this....it´s is possible to create an example?

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...