TOPIC: Specifying the size of a Dialog?
#1558
Specifying the size of a Dialog? 10 Months, 3 Weeks ago
The app I am writing requires configuration before it can be used. Thus, I check to see if it's configured already when run. If not, it pops up a dialog, of which the control is an Access1 on the settings table for my app. The problem is I have to resize this every time it's accessed. It starts off very small and I am unsure why or how to make it size in the Dialog. I have tried x,y,w,h and none of those seem to have an effect.

Thanks for any help,

Jeremy
 
 
#1562
Re:Specifying the size of a Dialog? 10 Months, 3 Weeks ago
Dialogs automatically size to their contents.

If the contents is stretchable AND you specify the right style (e.g. WS.SIZEBOX | WS.MAXIMIZEBOX | WS.SYSMENU) then the user can resize the dialog. But it will start out at the minimum size.

If you specify keep_size then the dialog will remember the previous size, but that does not help for the first time.

The easiest way to make the dialog bigger is to specify xmin and ymin on the contents.

e.g. Dialog(0, #(Editor xmin: 500, ymin: 500))

I hope that helps.
 
 
andrew
 
#1567
Re:Specifying the size of a Dialog? 10 Months, 3 Weeks ago
The main control is an Access1 and the dialog starts off at a size so small I can barely see anything in the Access1. I'd guess it's around 100x100 when starting but the main control requires much more area than that.

Does Dialog size itself properly when an Access1 is it's main control?

Jeremy
 
 
#1571
Re:Specifying the size of a Dialog? 10 Months, 3 Weeks ago
Access1 wraps its content in a ScrollControl. The minimum size of a ScrollControl is independent from its contents. (With scrolling the content can be bigger than the window.)

So you need to set xmin/ymin on your Access1. If you are putting xmin/ymin on a class then it will be Xmin: and Ymin:
 
 
andrew