[Done] Panel control default behavior

You need some new stunning features ? Tell us here.
cbrescia
New User
New User
Posts: 7
Joined: Tue Jul 22, 2008 11:50 pm
Location: Montevideo

[Done] Panel control default behavior

Post by cbrescia »

The Panel control default behaviour is not the usual. If a panel is firstly put on a form, after creating additional tabs with the pop up menu, when a new control is dragged over it, it defaults to the Windows_0 as the parent control. not to the active tab panel in the designer.

This attribute can be changed for every new control dragged, clicking the button "parent" and selecting Panel_x, Tab y (as parent panel and parent tab), but after doing so, the control goes up to the upper left corner of the panel. Therefore any control must be reallocated to the desired position then.

When doing such type of interfaces, a known example can be MS security essentials, the majority of the added controls are linked to the respective tab, not the form. Because the spirit of the tabbed interface is to group controls by category separately.

Also, even after linking a control to the panel, when the tabs are selected switching between them, an image of the control remains seen as if it is yet bond to the form as parent.

The suggestion is to change the default behaviour, and associate the dragged control to the active tab panel (at least always there is one active) as the parent control, when the new control area is inside the panel area when the button is released and the control located.
This can avoid a lot of extra work doing this interfaces.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Panel control default behavior

Post by Polo »

Fixed.
cbrescia
New User
New User
Posts: 7
Joined: Tue Jul 22, 2008 11:50 pm
Location: Montevideo

Re: [Done] Panel control default behavior

Post by cbrescia »

Using Purebasic 5.3 beta 4

1) Create a new form
2) Put a panel on it and resize it bigger
3) Create a new Tab2 with the right button pop up menu
4) Select Tab2 to be the active one
5) Put a button on Tab2
6) Select Parent in Layout

The control parents showed are Panel_0 and Tab1 instead of Tab2

If the control is reassigned to Tab1 in the dialog, it goes to the upper left corner of the panel.
Can it keep the position instead of going to a (0,0) position after changing the new parent Tab?

Thanks for your attention
Post Reply