Jump to content

Bug or something else


MarBar77

Recommended Posts

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

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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,

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

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