artem_niko Posted February 18 Posted February 18 Hello! How customize UniPopupMenu? I need: Remove vertical line; Make rounded corners in menu. See screen: Quote
Sherzod Posted February 18 Posted February 18 Hello, Could you first clarify which component you are using? Is it a UniMenuButton? Quote
artem_niko Posted February 18 Author Posted February 18 5 hours ago, Sherzod said: Hello, Could you first clarify which component you are using? Is it a UniMenuButton? Hello! Yes, UniMenuButton Quote
Sherzod Posted February 26 Posted February 26 On 2/18/2026 at 2:56 PM, artem_niko said: Remove vertical line; Hello, Are you using any specific theme? Quote
artem_niko Posted February 26 Author Posted February 26 7 hours ago, Sherzod said: Hello, Are you using any specific theme? Yes... Maybe exists universal solution? Quote
Sherzod Posted March 31 Posted March 31 On 2/26/2026 at 3:45 PM, artem_niko said: Maybe exists universal solution? Quote
Sherzod Posted March 31 Posted March 31 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; Quote
mikromundo Posted April 10 Posted April 10 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? Quote
Sherzod Posted April 10 Posted April 10 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? Quote
mikromundo Posted April 10 Posted April 10 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. Quote
mikromundo Posted April 10 Posted April 10 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? Quote
Sherzod Posted April 12 Posted April 12 On 4/10/2026 at 6:28 PM, mikromundo said: Could you create an example to apply rounding to a TUniPopUpMenu Quote
Sherzod Posted April 12 Posted April 12 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... Quote
Sherzod Posted April 13 Posted April 13 9 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; Quote
mikromundo Posted April 13 Posted April 13 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? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.