Jump to content

Recommended Posts

Posted

UniListBox1 de bulunan bilgileri sağ tuş ile işlem yaptırmak istiyorum. popup menuyü UniListBox1 e nasıl bağlayacağımı bulamadım.

Posted

Merhaba,

 

Belki bu çözüm size yardımcı olur:

 

1. UniListBox1 -> ClientEvents -> ExtEvents .. mousedown fn:

function mousedown(sender, x, y, eOpts)
{
  if (eOpts == 2){
    setTimeout(
      function(){
        ajaxRequest(sender, "_mousedown", ["x="+x, "y="+y])
      }
      , 10
    )
  }
}

2. UniListBox1 -> onAjaxEvent:

procedure TMainForm.UniListBox1AjaxEvent(Sender: TComponent; EventName: string;
  Params: TStrings);
var
  X, Y: Integer;
begin
  if EventName = '_mousedown' then
  begin
    X := StrToInt(Params.Values['x']);
    Y := StrToInt(Params.Values['y']);
    UniPopupMenu1.Popup(X, Y, UniListBox1);
  end;
end;

3. UniMainModule -> BrowserOptions [boDisableMouseRightClick = True]

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