Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » container of widgets
container of widgets [message #7228] Tue, 19 December 2006 01:37 Go to next message
Balage is currently offline  Balage
Messages: 17
Registered: December 2006
Promising Member
I'm positive this was asked before, I just couldn't find it through forum search.

What I want is this: Have a top window, and inside it containers, which contain other widgets.

The problem I have, is that the springs can only position relative to the containing window.

Suppose I want 2 buttons to move together. The first thing that comes to my mind, is that I create an invisible container, which moves relative to the main window, and add the 2 buttons to the container, which move relative to the container.

How can I achieve this?
Re: container of widgets [message #7230 is a reply to message #7228] Tue, 19 December 2006 06:05 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Balage wrote on Mon, 18 December 2006 19:37

I'm positive this was asked before, I just couldn't find it through forum search.

What I want is this: Have a top window, and inside it containers, which contain other widgets.

The problem I have, is that the springs can only position relative to the containing window.

Suppose I want 2 buttons to move together. The first thing that comes to my mind, is that I create an invisible container, which moves relative to the main window, and add the 2 buttons to the container, which move relative to the container.

How can I achieve this?



Exactly as you suggest Smile

The only problem is that Layout designer is not designed for "nested" operation. If you want to design this in Layout designer, you will have to use two layouts (one placing container to TopWindow, other for container).

BTW, the class intended for use as such container is ParentCtrl.

Mirek
Re: container of widgets [message #7235 is a reply to message #7228] Tue, 19 December 2006 10:18 Go to previous message
Balage is currently offline  Balage
Messages: 17
Registered: December 2006
Promising Member
Heh, I didn't need this after all Smile

To be honest, what I wanted, is to put 2 buttons into the middle bottom of a resizable dialog, and make them stay in the middle, with a fixed gap between the buttons, when the user resizes the dialog.

I simply achieved that by making a "Fixed Bottom" spring for both buttons, and make the rest turned off.

Still need to fully grasp the concepts... Smile

[Updated on: Tue, 19 December 2006 10:18]

Report message to a moderator

Previous Topic: Layout designer clashes with SetRect
Next Topic: How to get rid of the "minimal size limitation" of TopWindow?
Goto Forum:
  


Current Time: Mon Apr 29 16:12:56 CEST 2024

Total time taken to generate the page: 0.03420 seconds