cyhong Posted January 7, 2017 Share Posted January 7, 2017 is The cursor position is not the mouse position Quote Link to comment Share on other sites More sharing options...
cyhong Posted January 7, 2017 Author Share Posted January 7, 2017 I now use this method, I hope there is a more convenient way if Sender is TUniComboBox then begin y := (Sender as TUniComboBox).Top; x := (Sender as TUniComboBox).Left; iscolor := (Sender as TUniComboBox).Color; Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted January 7, 2017 Administrators Share Posted January 7, 2017 Hi, Obtaining cursor position can not be easy in a web app. You should not need it at all. Why do you need it in the first place? Quote Link to comment Share on other sites More sharing options...
cyhong Posted January 8, 2017 Author Share Posted January 8, 2017 When I save data need check edit status,find some edit error then setfocus and popup tips(tips need the position) Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 8, 2017 Share Posted January 8, 2017 Hi, Can you make a small test case for what you want ?! Quote Link to comment Share on other sites More sharing options...
cyhong Posted January 8, 2017 Author Share Posted January 8, 2017 thanks Project2.rar Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 8, 2017 Share Posted January 8, 2017 Hi, Can you try this?!: 'paddingX: '+IntToStr(x+Self.Left)+','+ 'paddingY: '+IntToStr(y+Self.Top)+','+ Quote Link to comment Share on other sites More sharing options...
cyhong Posted January 8, 2017 Author Share Posted January 8, 2017 self.top left is 0,I tried before Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 8, 2017 Share Posted January 8, 2017 Hi, You can also try to use this: _JSName: string; ... if (sender is TuniEdit) then begin if (sender as TuniEdit).Color=rgb(255,240,245) then begin //x:= (sender as TuniEdit).Left; //y:= (sender as TuniEdit).Top; errorstr := 'can not black'; show_tips:= true; _JSName := (sender as TuniEdit).JSName; end; end; ... ... 'paddingX: '+_JSName+'.getX(),'+ 'paddingY: '+_JSName+'.getY(),'+ ... Best regards. Quote Link to comment Share on other sites More sharing options...
cyhong Posted January 8, 2017 Author Share Posted January 8, 2017 thanks Delphi Developer can be obtained through ExtEvents->Focus ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 8, 2017 Share Posted January 8, 2017 Hi, can be obtained through ExtEvents->Focus ? function focus(sender, e, eOpts) { var me = sender; Ext.create('widget.uxNotification', { manager: 'fullscreen', title: 'title', html: 'errorstr', position: 'tl', spacing: 0, closable: false, paddingX: me.getX(), paddingY: me.getY(), useXAxis: false, stickOnClick: false, stickWhileHover: false, autoClose: true, autoCloseDelay: 5000, hideDuration: 0, iconCls: 'ux-notification-icon-information', slideInDuration: 500, slideBackDuration: 500, slideInAnimation: 'elasticIn', slideBackAnimation: 'bounceOut', alwaysOnTop: true }).show(); } Quote Link to comment Share on other sites More sharing options...
cyhong Posted January 9, 2017 Author Share Posted January 9, 2017 thanks Delphi Developer It's fine Quote Link to comment Share on other sites More sharing options...
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.