jahlxx Posted November 11, 2016 Share Posted November 11, 2016 Hi. I have a unipanel, with a custom button. The action of the button, is popup a menu with some options. When click the button on the panel header, the menu popup ok, but I can't control its position on the screen. I'd like it to be shown at the same position of the button, but I don't know how. I've tried with GetCursorPos and Mouse.CursorPos, but the menu is shown in a wrong place, never where I want. Any idea? Thanks. Link to comment Share on other sites More sharing options...
Sherzod Posted November 11, 2016 Share Posted November 11, 2016 Hi, Can you try to use UniMenuButton for this?! Best regards. Link to comment Share on other sites More sharing options...
jahlxx Posted November 11, 2016 Author Share Posted November 11, 2016 in the panel title? Link to comment Share on other sites More sharing options...
Sherzod Posted November 11, 2016 Share Posted November 11, 2016 Hi, Then, please, can you give us more details ?! Best regards. Link to comment Share on other sites More sharing options...
Sherzod Posted November 11, 2016 Share Posted November 11, 2016 Maybe you wanted like this?!: related with: http://forums.unigui.com/index.php?/topic/6947-panel-header-icons-tools/ function beforeInit(sender, config) { config.tools = [{ type: 'gear', handler: function(e) { ajaxRequest(sender, "_gear", ["x="+e.browserEvent.clientX, "y="+e.browserEvent.clientY]) } }, { type: 'pin' }]; } procedure TMainForm.UniPanel1AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); var x, y: Integer; begin if EventName = '_gear' then begin x := StrToInt(Params.Values['x']); y := StrToInt(Params.Values['y']); UniPopupMenu1.Popup(x, y); end; end; Link to comment Share on other sites More sharing options...
jahlxx Posted November 11, 2016 Author Share Posted November 11, 2016 yes. that is. i did not know how to pass coordinates. thanks. Link to comment Share on other sites More sharing options...
bolossis Posted April 19, 2018 Share Posted April 19, 2018 Actually i try to popup a menu in a UniUrlFrame. But i cant get the coordinates Any Help? Link to comment Share on other sites More sharing options...
Sherzod Posted April 19, 2018 Share Posted April 19, 2018 Hi, What do you have on UniURLFrame? Link to comment Share on other sites More sharing options...
bolossis Posted April 20, 2018 Share Posted April 20, 2018 A management page of users. But i need only the xy values of the cursor on the UniUrlFrame. I don't need any parameters passed from ajax request Also using build 1425 Link to comment Share on other sites More sharing options...
Sherzod Posted April 20, 2018 Share Posted April 20, 2018 Is possible to make a simple testcase? Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now