MarBar77 Posted March 15, 2018 Share Posted March 15, 2018 Hi, I am making my own component TUniOnlinePanel. This components has to be dragabble (with normal arrow cursor) and resizable. When I put components on the normal form everything works fine (Movie1). But when I put the component on frame I have 3 incorrect cases: 1) When component is visually created in desinger and put on tabsheet of TUniPage control on or panel resizing works unnaturally 2) When component I create tabsheet of tunipagecontrol in runtime and after it components are created in runtime and putted on those tabsheets then it is draggable but cursor is bad and i cannot reszie the component 3) Moreover when I create new component on tabsheet which is already created then mousecursor is good, but i still cannot resize component by mouse. Here is the movie of incorrect beahaviour and sourcecode of my component. It looks that those methods don't work properly on the frame. Could someone help with this or tell me if it a proper beahaviour or not? Movie1.zip Movie2.zip uUniOnlinePanel.zip Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 16, 2018 Share Posted March 16, 2018 Hi, We will check Quote Link to comment Share on other sites More sharing options...
MarBar77 Posted March 18, 2018 Author Share Posted March 18, 2018 Maybe this helps to find what is the problem: 1) I have added Name for dynamically created components and "Resizing" works but with strange control movement like on the movie2. 2) When I disable draggable property then resizing works ok lik in movie1. So how to make that resizing and dragging works together when control is created in runtime? I have try to replace order of adding ExtEvents and setting draggable in component constructor but this does not help. Marcin Quote Link to comment Share on other sites More sharing options...
MarBar77 Posted March 21, 2018 Author Share Posted March 21, 2018 Hi, Any progress with this issue? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 21, 2018 Share Posted March 21, 2018 Hi, Sorry for delay, can you make a simple testcase for this issue?! And please specify which build you are using Quote Link to comment Share on other sites More sharing options...
MarBar77 Posted March 21, 2018 Author Share Posted March 21, 2018 Ok, Here is test case. When I have making it, I have found that creating components in runtime makes this behaviour and it not depends if it is placed on form or on frame. In test case I have placed 2 components in design time and create 3 components in runtime. Marcin TC.zip Quote Link to comment Share on other sites More sharing options...
MarBar77 Posted March 24, 2018 Author Share Posted March 24, 2018 Hi, Delphi Developer, did you examine test case? Marcin Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 24, 2018 Share Posted March 24, 2018 Hi, Sorry for delay, Solution: Give a name to the component onlPanel := TUniOnlinePanel.Create(UniPageControl1.Pages[1]) as TUniOnlinePanel; onlPanel.Name :='onl1'; //<------------- onlPanel.Parent := UniPageControl1.Pages[1]; onlPanel.Left := 20; onlPanel.Top := 20; onlPanel.Width := 450; onlPanel.IndicatorTitle := 'Panel in Runtime ts1 - cannot resize and cursor is not arrow'; Best regards, Quote Link to comment Share on other sites More sharing options...
MarBar77 Posted March 24, 2018 Author Share Posted March 24, 2018 Hi, Yeah, I write about it in third post, but resizing is not working then like in component, which is placed in design time. Look in test case how it is resizng for component in design time and for component from runtime. Moreover, Arrow cursor is not respected (I am assinging it in code) it is changed for drag cursor for runtime components. I am using first version of Delphi XE an uniGUI 1.0.0.1425. Marcin Quote Link to comment Share on other sites More sharing options...
MarBar77 Posted March 25, 2018 Author Share Posted March 25, 2018 Additionally I've found that when I disable dragging then resizing for runtime components works fine. Maybe this help to find what is going on. So summarizing: 1) Designtime component works fine 2) Runtime component: - with draggable: resizing works unnaturally and cursor is always "drag cursor" (althought i set cusrosr as crArrow in code) - without draggable: resizing works ok. So it looks that draggable is making the problem. Marcin 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.