Controls do not Auto Adjust on Device MDA Pro

corwin42

Expert
Licensed User
Longtime User
Ok, there seems to be a misunderstanding what autoscale does.

Autoscale adjusts the display of controls to let them look ok on different display types as for WVGA/VGA, WQVGA/QVGA. You develop your application in 240x320 and compiled with autoscale it looks the same on 480x640 devices.

Autoscale does NOT scale the controls if you rotate the screen. You have to use the door.library for that setting Dock and Anchor properties of the controls. For a slimple example look Post #5 in this thread.

Hope this helps
Markus
 

klaus

Expert
Licensed User
Longtime User
As corwin42 said, AutoScale does only adjust the size and position of objects on the forms according to the screen resolution.
It does not rearrange the controls on the screen when turning it from portait to landscape.
You can do it either with corwin42's example or you could also do it by setting two layouts on the form, one for portrait and another one for landscape, of course by code. When starting the program, check the screen orientation and rearrange all the controls.

On your MDA does the screen automatically change the orientation when you turn your device ?

Best regards.
 

wm.chatman

Well-Known Member
Licensed User
Longtime User
As corwin42 said, AutoScale does only adjust the size and position of objects on the forms according to the screen resolution.
It does not rearrange the controls on the screen when turning it from portait to landscape.
You can do it either with corwin42's example or you could also do it by setting two layouts on the form, one for portrait and another one for landscape, of course by code. When starting the program, check the screen orientation and rearrange all the controls.

On your MDA does the screen automatically change the orientation when you turn your device ?

Best regards.
yes, the screen automatically changes the orientation when I turn the Screen on device.
 

wm.chatman

Well-Known Member
Licensed User
Longtime User
Ok, the Rearrange.sbp samble works a treat!
I will give it a go hope I can work it out.

thanks for your patience, and to the folks that try to help.:)

Best regards
William
PS> i am not a Veteran!
 

wm.chatman

Well-Known Member
Licensed User
Longtime User
Ok, the Rearrange.sbp samble works a treat!
I will give it a go hope I can work it out.

thanks for your patience, and to the folks that try to help.:)

Best regards
William
PS> i am not a Veteran!
do I also need to add the Panel1 to the App?
Hello Mr. Agraham
 

wm.chatman

Well-Known Member
Licensed User
Longtime User
I added Panel1 to the App, added Components, and Objekt now getting a error msgBox
 
Last edited:

wm.chatman

Well-Known Member
Licensed User
Longtime User
:( I must state that I am Ashamed, just can’t get this right. Added all the correct Properties that had been needed. But still just does not function. By gosh, I am getting just a might teed off here right now.
We have a darn good Rearrange Example now, but still I don’t get it!
I really do not know what else needs to be done. (Hands up in Air) :confused:Can’t even get something this simple to work.

S…, not so Bright Bulb needs help :sign0148:
Thank you
 

klaus

Expert
Licensed User
Longtime User
Why do you copy almost the whole code in the previous post ?
We can't do anything with it, you should post the source file, so we can load it and test.
From what I saw you copied a part of the source code from the Rearrange example. But:
- did you add the door library to your projct
- did you declare the dobj object
- the controls in the Rearrange source code are not the same as in yours, so you must adapt them to yours.
- to be able to scroll up and down your controls you must move them from the form onto a Panel and play with the Panel.Top parameter.​

Before beginning coding you should determine what you want and what you need:
- do you really need or want to have both screen orientations ?
- if yes:
-- you must determine the 2 layouts you want
-- set the positions of all your controls according to current layout.
-- to test the landscape layout change, in the IDE, the screen size from 320*240 to 240*320​

What do you think about the added new version ?​

Best regards.​
 
Last edited:

wm.chatman

Well-Known Member
Licensed User
Longtime User
Why do you copy almost the whole code in the previous post ?
We can't do anything with it, you should post the source file, so we can load it and test.
From what I saw you copied a part of the source code from the Rearrange example. But:
- did you add the door library to your projct
- did you declare the dobj object
- the controls in the Rearrange source code are not the same as in yours, so you must adapt them to yours.
- to be able to scroll up and down your controls you must move them from the form onto a Panel and play with the Panel.Top parameter.​

Before beginning coding you should determine what you want and what you need:
- do you really need or want to have both screen orientations ?
- if yes:
-- you must determine the 2 layouts you want
-- set the positions of all your controls according to current layout.
-- to test the landscape layout change, in the IDE, the screen size from 320*240 to 240*320​

What do you think about the added new version ?​
looks Great.
you really have made alot of changes to the App., and again you have spent time to help me! Respect Sir!
but, now we have no Buttons? Ok.

Let me work with this Info you have given me, concerning the - do you really need or want to have both screen orientations? Maybe not, let me think about it.
yes, I added the door library to the project
yes, I also declared the dobj object

I will bust Nut on this a couple of weeks for right now. So, if I add a new frm to the App I will have the same Problem with using both screen orientations.
Maybe we do not need, like I wrote I will work on this for a couple of Weeks now.

Klaus, to be quite honest I sure am I guess not such a Bright Bulb...

Best regards.​
Herzlichen Dank

William
 

wm.chatman

Well-Known Member
Licensed User
Longtime User
Why do you copy almost the whole code in the previous post ?
We can't do anything with it, you should post the source file, so we can load it and test.
From what I saw you copied a part of the source code from the Rearrange example. But:
- did you add the door library to your projct
- did you declare the dobj object
- the controls in the Rearrange source code are not the same as in yours, so you must adapt them to yours.
- to be able to scroll up and down your controls you must move them from the form onto a Panel and play with the Panel.Top parameter.​

Before beginning coding you should determine what you want and what you need:
- do you really need or want to have both screen orientations ?
- if yes:
-- you must determine the 2 layouts you want
-- set the positions of all your controls according to current layout.
-- to test the landscape layout change, in the IDE, the screen size from 320*240 to 240*320​

What do you think about the added new version ?​

Best regards.​
:)Very nice, lovely Klaus!:sign0060:
it also added more room at bottom of frm.
kanst Du Gedanken lessen? :confused:
 

wm.chatman

Well-Known Member
Licensed User
Longtime User
Please can you trim the number and size of your posts! There is no need to post so much, so repeatedly and so often with duplication. As Klaus says, if you want to post source code then please post it as a file not as text.
:)yes Sir, the source code in permalink26 had been cut down before you posted this Mr. Agraham.
Best regards
 
Top