Re: "Sticking" buttons to the Right Margin

  • From: "RicksPlace" <ofbgmail@xxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Thu, 25 Mar 2010 14:04:17 -0400

Hi: Well, that is how I first tried messing with ReSizing. OK, now, if you specify pt as the size type I am not sure it should ReSize. I always thought it was a fixed length or width setting that was suppose to be the same size no matter the resolution of the viewing device and do not know if it is even suppose to be ReSizable. I do remember that there is a minimum size property, I think, on some controls but have never messed with any of them. I guess I am not much help here. Perhaps one of the other guys will have worked with devices like PDA or phone applications and know about ReSizing to that degree. Ya, I just avoid doing it but would think of how to do it if I were putting out an application, or not, just not sure. Microsoft has programs that I noticed get larger or smaller depending on what screen Resolution I have set. This indicates that they just use fixed size for their UI in those applications since they do not automatically ReSize when I change my screen resolution. Anyway, hope somebody has been there and done that since, like you, I should think it a fundemental thing but then, well, Microsoft and other applications don't do it so I am not sure either. Well, I don't know what I am talking about so guess I am rambling and will sign off until later.

Rick USA
----- Original Message ----- From: "Donald Marang" <donald.marang@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Thursday, March 25, 2010 10:21 AM
Subject: Re: "Sticking" buttons to the Right Margin


I do not really need to resize. I was attemptting to write a well behaved application that adjusts to different resolutions, screen sizes and the users desires. I have not considered handheld devices for this application, but it would certainly be desirable for my next application. I think the size first displayed is the minimum size that will work properly, but I am not sure I prevent making it smaller. I know many JAWS users have utilities that automatically maximize all windows. Some users with some vision might want to maximize the Results and minimize scrolling. The default size of the Filename text box is redicuklously small, 100 pt I think, and some users might want this to be enlarged. This field does grow as the window size is enlarged. Some of the motivation for me is learning how this can and should be done. I may play around with panels and table panels in particular. It just seems like a way to handle window placement more like an object includeing the encaptualization benefits.

Don Marang

--------------------------------------------------
From: "RicksPlace" <ofbgmail@xxxxxxxxx>
Sent: Thursday, March 25, 2010 9:20 AM
To: <programmingblind@xxxxxxxxxxxxx>
Subject: Re: "Sticking" buttons to the Right Margin

Hi Don: I agree fully. I found so much wierd sounding technicals when I wanted to do it that I just went with a fixed page size. You might look at putting those controls inside a TableLayout Panel Winforms control. I think I remember something about automatic ReSizing related to controls inside a TableLayout Panel but will have to go back and do some Googling to see if it had anything to do with what you are trying to do. At the very least, you only have to move around the TableLayout Panel and all the controls inside it are automatically moved and, I think, maintain their relative positions within the Panel. So, if you move the panel over to the right edge of the screen, the endpoint of the panel that is, and you have the panel set up to have 14 pixels or some percentage of space at the right of the panel, then you should, in theory, have that space so long as you maintain the panel at the right edge of the window and I should think ReSizing would take care of that automatically, I don't know but that is what I might try out of the gate and before doing any complicated processes. Also, using pt as your size type might be problematic since that says to maintain a constant size in inches and I do not how it would work when something is ReSized. Why do you need the ReSizing? Is it to keep the form consistent when clients have diferent screen resolutions or something else? For example, do you want the product to run on hand-held devices or on Desk-Top machines or both?
Rick USA
----- Original Message ----- From: "Donald Marang" <donald.marang@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Thursday, March 25, 2010 8:55 AM
Subject: Re: "Sticking" buttons to the Right Margin


That sounds like such a basic thing. I find it incredulous that Visual Studio can grow controls automatically but can not maintain a constant right margin! I suppose I can handle writing code to tweak these positions for the two events you mentioned. They have so many properties like margin and dock that sound like they should take care of this, I thought I was just getting confused between how to set the correct combination. However, if I manually set the placement of the "Perform OCR" button, I would probably need to go back and readjust the position of the "Browse..." button and readjust the size of the "Filename" text edit field as well. As I consider this, I should need to subtract 14 from the x location properties of these two buttons and from the x size of the text box after the standard code is executed for resize events. Do the event handlers you mentioned get performed after the normal processing, before the normal processing, or do I need to explicitly call the normal event processing within my event handlers?

Don Marang

--------------------------------------------------
From: "Martin Slack" <m.g.slack@xxxxxxxxxxxx>
Sent: Thursday, March 25, 2010 3:43 AM
To: <programmingblind@xxxxxxxxxxxxx>
Subject: Re: "Sticking" buttons to the Right Margin

Hi Don,

I guess the simple but boring answer is to read the window size in the form's Resize or ResizeEnd event and then code your spacing calculation on the fly within the same event.

I did think that a control's margin property was intended to keep them from overlapping, but I can't see how to make them honour the setting.

 Martin



----- Original Message ----- From: "Donald Marang" <donald.marang@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Thursday, March 25, 2010 12:24 AM
Subject: "Sticking" buttons to the Right Margin


In my QuickOCR Visual Basic .Net application I wrote in Visual Studio 2008, I have not been able to get the right side alignment correct. My last message had a little better description of the application. I have the source code and more information available at:
http://mysite.verizon.net/marangs/QuickOCR.html

My design layout issue is that the original, and I think minimum size of the main window is 450 x 500. I want it expandable to the full size of the screen if necessary. When expanded I want the "Perform OCR" and "Exit" buttons to stick to the right side of the window, while retaining a 14 pt spacing between the button and the right side of the window. I also want the Text "Results" rich text box and the "Filename" text vbox to grow as well. These boxes grow properly, but I have the same problem with the rich text box as with the buttons. As the window grows, these controls get jammed up against the right side of the window. So far the location and size properties have been calculated to provide the correct spaceing when set the designed size. How should this be accomplished? I have randomly attempted to use other settings, but have not ran across the right combination.

Don Marang
__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind


__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind



__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

Other related posts: