Click to See Complete Forum and Search --> : resizable text button


rani_techie
May 1st, 2006, 10:34 PM
dear friends,

i have an assignment where the program shd read strings from a text file and display words in a labelbutton.. and the label shd resize itself accd to the length of the word. text file contains words like net, visualbasic.. etc of different length and languages..

thnx in advance
Rani

aniskhan
May 1st, 2006, 10:46 PM
u can use the measurestring and height properties of font to get the height width of the string ,then use these values to set the size of label button

aniskhan
May 1st, 2006, 11:31 PM
Dim sizef As SizeF = grfx.measurestring(String, Font)()
buttonLabel.Size = New Size(sizef.Width, sizef.Height)

rani_techie
May 2nd, 2006, 06:02 AM
hey thnx but i did my work by using other method... thnx again

aniskhan
May 2nd, 2006, 08:11 AM
what method did u used..thanx