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 » Set Button's size programmatically (with maintaining the left-top position)
Set Button's size programmatically (with maintaining the left-top position) [message #40712] Sun, 08 September 2013 08:21 Go to next message
iST1 is currently offline  iST1
Messages: 107
Registered: August 2013
Experienced Member
It is correct? (maybe exists special API for this?)
	
Button::LogPos btnPos = btn.GetPos();
	
btn.LeftPos(btnPos.x.GetA(), newWidth);
btn.TopPos(btnPos.y.GetA(), newHeight);

[Updated on: Sun, 08 September 2013 08:23]

Report message to a moderator

Re: Set Button's size programmatically (with maintaining the left-top position) [message #40715 is a reply to message #40712] Sun, 08 September 2013 11:06 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13986
Registered: November 2005
Ultimate Member
Yes, as long as button is not defined in layout using RightPos or BottomPos (then GetA returns the distance from bottom/right).

Mirek
Re: Set Button's size programmatically (with maintaining the left-top position) [message #40718 is a reply to message #40715] Sun, 08 September 2013 17:32 Go to previous message
iST1 is currently offline  iST1
Messages: 107
Registered: August 2013
Experienced Member
thnx Mirek
Previous Topic: How to catch a (registered) Message comming from other application
Next Topic: Ctrl::ProcessEvent()
Goto Forum:
  


Current Time: Sat Jun 22 23:59:33 CEST 2024

Total time taken to generate the page: 0.01031 seconds