Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
daadle
daadle's Profile
1
Posts
0
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Proportional / fixed aspect ratio window scaling with frame.setResizable
[1 Reply]
01-May-2013 12:49 PM
Forum:
Programming Questions
Hello,
I cant figure it out how to make scaling of the application or run window scalable with fixed proportions
I tried this (for 3:2):
frame.setResizable(true);
if ((width > height + (height/2)) || (width < height + (height/2))) {
frame.setSize(width, width - (width/3) );
frame.setResizable(false);
}
and without "
frame.setResizable(false); "
The first one allows u to scale only once and than the scale arrows in corner are refreshing all the time.
The second version makes a glitchy blinking effect when scaling and doesn't scale properly.
Both versions allow the scaling process to scale in the un-proportional way and than it jumps to the right size when u release mouse.
Is there any command for this like: frame.setProportions or something?
Dan
«Prev
Next »
Moderate user : daadle
Forum