Jump to content

How dropdown menu button on click?


Beginner

Recommended Posts

How about set width popupmenu equal width unimenubutton  on click?

 

For now try,

 

UniMenuButton1->ClientEvents->ExtEvents-> afterrender fn:

function afterrender(sender, eOpts)
{
    Ext.onReady(function(){
        if (sender.menu){
            sender.menu.setWidth(sender.width)
        }
    })
}
Link to comment
Share on other sites

 

For now try,

 

UniMenuButton1->ClientEvents->ExtEvents-> afterrender fn:

function afterrender(sender, eOpts)
{
    Ext.onReady(function(){
        if (sender.menu){
            sender.menu.setWidth(sender.width)
        }
    })
}

 

Delphi Developer

 

Not work this method I try

Link to comment
Share on other sites

Then can you try this approach?:

 

click fn:

function click(sender, e, eOpts)
{
  sender.maybeShowMenu();
  if (sender.menu) {
      sender.menu.setWidth(sender.getWidth());
  }
}

arrowClick fn:

function arrowclick(sender, e, eOpts)
{
  if (sender.menu) {
      sender.menu.setWidth(sender.getWidth());
  }
}
Link to comment
Share on other sites

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...