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++ Library : Other (not classified elsewhere) » [Feature request] Relative positioning
[Feature request] Relative positioning [message #48644] Fri, 11 August 2017 09:51 Go to previous message
rafiwui is currently offline  rafiwui
Messages: 105
Registered: June 2017
Location: Stuttgart, Germany
Experienced Member
Working on an app with resizable option I discovered that I am not able to resize/reposition the ctrls relative to their original set size/position.
What I am thinking about is a sizing/positioning option so the ctrls get resized/positioned like the following:
1. Original size
index.php?t=getfile&id=5371&private=0
2. X-Size 1.5x
index.php?t=getfile&id=5372&private=0
3. X-Size 2x
index.php?t=getfile&id=5373&private=0
4. Y-Size 1.5x
index.php?t=getfile&id=5374&private=0
5. X-Size 1.5; Y-Size 2x
index.php?t=getfile&id=5376&private=0

Source code for these layouts (a bit formatted for clean review of the important things):
LAYOUT(button_bar, 450, 50)
	ITEM(Button, generate, LeftPosZ( 10,  90).TopPosZ(10, 30))
	ITEM(Button, previous, LeftPosZ(130,  90).TopPosZ(10, 30))
	ITEM(Button, next,     LeftPosZ(230,  90).TopPosZ(10, 30))
	ITEM(Button, cancel,   LeftPosZ(350,  90).TopPosZ(10, 30))
END_LAYOUT

LAYOUT(button_bar_biggerX, 675, 50)
	ITEM(Button, generate, LeftPosZ( 15, 135).TopPosZ(10, 30))
	ITEM(Button, previous, LeftPosZ(195, 135).TopPosZ(10, 30))
	ITEM(Button, next,     LeftPosZ(345, 135).TopPosZ(10, 30))
	ITEM(Button, cancel,   LeftPosZ(525, 135).TopPosZ(10, 30))
END_LAYOUT

LAYOUT(button_bar_biggestX, 900, 50)
	ITEM(Button, generate, LeftPosZ( 20, 180).TopPosZ(10, 30))
	ITEM(Button, previous, LeftPosZ(260, 180).TopPosZ(10, 30))
	ITEM(Button, next,     LeftPosZ(460, 180).TopPosZ(10, 30))
	ITEM(Button, cancel,   LeftPosZ(700, 180).TopPosZ(10, 30))
END_LAYOUT

LAYOUT(button_bar_biggerY, 450, 75)
	ITEM(Button, generate, LeftPosZ( 10,  90).TopPosZ(15, 45))
	ITEM(Button, previous, LeftPosZ(130,  90).TopPosZ(15, 45))
	ITEM(Button, next,     LeftPosZ(230,  90).TopPosZ(15, 45))
	ITEM(Button, cancel,   LeftPosZ(350,  90).TopPosZ(15, 45))
END_LAYOUT

LAYOUT(button_bar_bigger_mixed, 675, 100)
	ITEM(Button, generate, LeftPosZ( 15, 135).TopPosZ(20, 60))
	ITEM(Button, previous, LeftPosZ(195, 135).TopPosZ(20, 60))
	ITEM(Button, next,     LeftPosZ(345, 135).TopPosZ(20, 60))
	ITEM(Button, cancel,   LeftPosZ(525, 135).TopPosZ(20, 60))
END_LAYOUT


Like you can see in the code it is basically a pretty simple thing, because everything is scaled up/positioned multiplied by the same factor: the scaling factor of the resized window.
If you can give me a hint where to find the method(s) called when resizing the window, maybe I can fit the library to my needs and/or contribute a solution.

Please correct me if there is already something to achieve that but I didn't find anything.

See this thread also.


Greetings
Daniel
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [Bug (minor)]: CenterScreen not working
Next Topic: reference/OpenGL crashes
Goto Forum:
  


Current Time: Fri Mar 29 01:40:18 CET 2024

Total time taken to generate the page: 0.00870 seconds