Two simples questions

leazfe
05-07-2004, 08:53 AM
I am not really good with the GUI. :huh:

1. I have done something with my controls,becouse for all the new label and Textbox i add to a form, i am not able to change its height only the width.Hoewer, i can do it with my all controls in the same form. Does anyone know Why?

2. How can a change the color of a labels border.?

Thanks,
Álvaro

Machaira
05-07-2004, 10:57 AM
1. I don't know why you wouldn't be able to change a Label's height (you should be able to unless the AutoSize property is set to True), but for TextBoxes you can only change the Height if the Multiline property is set to True. It makes sense that you can't make it taller if it only displays one line of text.

2. Something like:


Private Sub Label1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Label1.Paint

e.Graphics.DrawRectangle(New Pen(Color.Red), New Rectangle(0, 0, Label1.Width - 1, Label1.Height - 1))

End Sub

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum