Xojo "Locking" Controls: Limiting

Why can I not just lock a control to the top? I don’t want a control to be “locked” to the top AND the right. I find it frustrating that Xojo lacks this very basic ability that all other IDEs have. In Xcode and Visual Studio, you can “lock” a control to any one area: the Top, Left, Right, and Bottom. You can even have the control NOT be “locked” to any side.

In fact, I think even Real Studio had this function.

Um…you can lock controls in Xojo just like you did in Real Studio. Instead of checkboxes it’s an irritating graphic with lock symbols, but the functionality is the same.

Shane, you could make a feature request for this. But, we’re working on auto layout so the locking will go away when that is finished.

[quote=44379:@Shane Gibbs]Why can I not just lock a control to the top? I don’t want a control to be “locked” to the top AND the right. I find it frustrating that Xojo lacks this very basic ability that all other IDEs have. In Xcode and Visual Studio, you can “lock” a control to any one area: the Top, Left, Right, and Bottom. You can even have the control NOT be “locked” to any side.

In fact, I think even Real Studio had this function.[/quote]
The reality was that in Real Studio if you unset all the locks it behaved exactly as if it were locked top & left
Thats now explicit

Actually, the functionality is not the same. Yes, you can lock just as before, but what you cannot do is lock to a single position. For example, you cannot lock to just the top. It has to be locked to two positions, like the top and right.

That’s awesome. Will auto-layout be something releasing this year? Or will we have to wait to XDC?

Thanks,
Shane.

No, it really is exactly the same. The behavior did not change one tiny bit, only the UI did. LockLeft is implied if LockRight is false. The Real Studio UI let you believe otherwise, but it wasn’t true.

@Jason: oh no, please don’t remove the feature to override the auto layout. When I do a complex layout I need 100% control over it. Ahem, Xojo has been hit and miss with stuff like that and the mere idea that I don’t have control makes me cringe.

Not sure what auto layout mean practically, but I’m sure in some/many situations it will be very useful…

However there are times we need very specific locking/positioning behavior. Hopefully auto layout wont require us to do more coding to do non typical things… Maybe auto layout should be an option for each control in addition to current behavior?

i agree with Karen… should be a yes/no thing in the inspector.

Shane, it won’t be this year but we’re working on it :slight_smile:

Beatrix and Karen - It’s still in progress so I can’t say exactly how it will work yet. I see that both of you are beta testers so I would keep a close eye on it and try it in the first beta.

Has this been solved yet ? I just updated from RB 2012 2.1 to 2016 r1.1 which forced the switch from Carbon to Cocoa.

I used to be able to lock all sides for a listbox. Now even if I do, left, top and right are locked, but not Bottom.

I want my listbox to take up the whole bottom of my window and stay lke that even if the user resizes the window. How should I do this ?

[quote=264362:@FrdricDame]Has this been solved yet ? I just updated from RB 2012 2.1 to 2016 r1.1 which forced the switch from Carbon to Cocoa.

I used to be able to lock all sides for a listbox. Now even if I do, left, top and right are locked, but not Bottom.

I want my listbox to take up the whole bottom of my window and stay lke that even if the user resizes the window. How should I do this ?[/quote]

My mistake, my listbox was child of another control which effectively hid the fact that the ListBox WAS resizing.