Click here to Skip to main content
16,006,065 members
Home / Discussions / C#
   

C#

 
Generalpictures in textboxes Pin
vyki_c30-Sep-04 6:22
vyki_c30-Sep-04 6:22 
GeneralRe: pictures in textboxes Pin
Heath Stewart30-Sep-04 6:40
protectorHeath Stewart30-Sep-04 6:40 
GeneralReal Time Applications Pin
sreejith ss nair30-Sep-04 6:03
sreejith ss nair30-Sep-04 6:03 
GeneralRe: Real Time Applications Pin
Dave Kreskowiak30-Sep-04 7:25
mveDave Kreskowiak30-Sep-04 7:25 
GeneralRe: Real Time Applications Pin
sreejith ss nair30-Sep-04 7:30
sreejith ss nair30-Sep-04 7:30 
GeneralRe: Real Time Applications Pin
Dave Kreskowiak30-Sep-04 7:52
mveDave Kreskowiak30-Sep-04 7:52 
GeneralRe: Real Time Applications Pin
Heath Stewart30-Sep-04 9:19
protectorHeath Stewart30-Sep-04 9:19 
GeneralEvil Textboxes Width Changes When Large Fonts (C#) Pin
dbromberg30-Sep-04 5:48
dbromberg30-Sep-04 5:48 
Hey all,
I'm trying to adapt our application to work with large fonts- that is when someone goes to display properties, appearances, and changes font size to large or extra large, have my application have larger font sizes. The basic change I've made which works fine is to put in the constructor of the main application the code:

this.Font = new Font(this.Font.FontFamily, SystemInformation.MenuFont.SizeInPoints, this.Font.Style, this.Font.Unit, this.Font.GdiCharSet, this.Font.GdiVerticalFont);
SizeF sf = Form.GetAutoScaleSize (this.Font);
this.AutoScaleBaseSize = sf.ToSize ();
this.AutoScale = true;

I had some trouble just changing the fontsize, that's why I've got that more complicated call (which may not be entirely necessary). Anyway, that works. The problem is that for some reason, in some of my internal controls (but not all! that's the thing) textboxes are getting wider- stretching to the right. This is causing problems like the textboxes covering up buttons that are next to them, etc. I can't figure out for the life of me why they're getting wider- and I can't figure out why only on some controls they are. For example, on one form they're stretching as far as the panel lets them.

I thought it might be the AutoSize property, but even with that off, they still do it (the AutoSize property, as it turns out, only resizes the height based on font size). I coded something that just reverses the change, but there should just be a way to tell the textbox not to resize automatically like it is doing. I checked all over my code and there's nothing I do to change the width. In fact, when I tried to put the code to reverse the automatic change in the Layout event rather than the Resize event, it works, but then when I minimize and maximize, the textboxes stretch again, so it really does see like something built in. Does anyone have any clue as to what might be causing this and how to turn it off?

-David
GeneralRe: Evil Textboxes Width Changes When Large Fonts (C#) Pin
leppie30-Sep-04 7:47
leppie30-Sep-04 7:47 
GeneralRe: Evil Textboxes Width Changes When Large Fonts (C#) Pin
dbromberg30-Sep-04 8:17
dbromberg30-Sep-04 8:17 
Generalstatic variable Pin
goatstudio30-Sep-04 5:32
goatstudio30-Sep-04 5:32 
GeneralRe: static variable Pin
Dave Kreskowiak30-Sep-04 6:01
mveDave Kreskowiak30-Sep-04 6:01 
GeneralRe: static variable Pin
goatstudio30-Sep-04 6:22
goatstudio30-Sep-04 6:22 
GeneralRe: static variable Pin
Heath Stewart30-Sep-04 6:22
protectorHeath Stewart30-Sep-04 6:22 
GeneralRe: static variable Pin
goatstudio30-Sep-04 6:27
goatstudio30-Sep-04 6:27 
GeneralRe: static variable Pin
Heath Stewart30-Sep-04 6:42
protectorHeath Stewart30-Sep-04 6:42 
GeneralRe: static variable Pin
Dave Kreskowiak30-Sep-04 8:33
mveDave Kreskowiak30-Sep-04 8:33 
GeneralRe: static variable Pin
Heath Stewart30-Sep-04 9:10
protectorHeath Stewart30-Sep-04 9:10 
GeneralRe: static variable Pin
Dave Kreskowiak30-Sep-04 10:57
mveDave Kreskowiak30-Sep-04 10:57 
GeneralTransparent Panel Pin
MarkMokris30-Sep-04 5:28
MarkMokris30-Sep-04 5:28 
GeneralRe: Transparent Panel Pin
Heath Stewart30-Sep-04 6:32
protectorHeath Stewart30-Sep-04 6:32 
GeneralRe: Transparent Panel Pin
MarkMokris30-Sep-04 6:36
MarkMokris30-Sep-04 6:36 
GeneralRe: Transparent Panel Pin
Heath Stewart30-Sep-04 6:50
protectorHeath Stewart30-Sep-04 6:50 
Generalword formatting bar Pin
RomanD30-Sep-04 5:15
RomanD30-Sep-04 5:15 
GeneralRe: word formatting bar Pin
Dave Kreskowiak30-Sep-04 5:57
mveDave Kreskowiak30-Sep-04 5:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.