Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

question about C# and form layouts

Status
Not open for further replies.

Alsa1980

Programmer
Jul 11, 2006
5
GB
Hi all!

I am newly converted to C# from a Java background and wonder if anyone could help me with a problem.

Background:

I have a c# form consisting of some buttons, labels and text fields. I'd like to make use of what i can only describe as the scaling classes. I'd like to be able to scale down a whole form which is being used on a PDA - controls, labels, white space, everything! I can manage to use something like this (forgive me if there are syntax errors, the original source is at work):


foreach (Controls control in this.Controls)
{
control.Scale(scaleChangeValue);
}


this alters the scale of the controls in my form. i can reduce their scale incrementally (and to a certain extent it does exactly what i require..) but eventually they bunch together and collide - they all push towards their anchor ( i think and changing anchors to none etc does not help).

In Java i would normally just have a layout type to avoid this. does anyone have any suggestions as to how i could 'shrink' a form whilst keeping its integrity and layout? also, which may be important, as it is created through the Visual studio suite and a PDA project, the forms are generally not movable windows. Rebuilding the UI from scratch is really my last option as this one form has around 20 others which need the same effect applying.

thanks in advance, i hope i have explained myself adequately!

best wishes.
 
It's tough creating a decent GUI on a PDA. It's especially hard because every PDA has different screen dimensions and layouts.

I know MS came out with a web toolkit for providing websites on multiple devices such as cellphones, PDAs, tablets, and other small devices. The idea was to provide the functionality, not a static GUI. While this may not help so much in this case, it may make your future development a little bit easier.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top