Tuesday, 15 September 2015

combobox - Using right-align on a group of two label controls in C# -



combobox - Using right-align on a group of two label controls in C# -

i have application running, reason 2 label controls not align way want.

the application converts 1 length another, depending on selection made in combo box. there these controls, left right, top bottom shown:

comboboxlabel, combobox labeloriginlength, textboxoriginlength labelconvertedlength, textboxconvertedlength (read only)

buttoncalculate, buttonexit

the load event handler form sets combo box select 0 index item in list.

there handler selectedindexchanged. handler finds right origin , destination length labels, stored in rectangular array follows:

string[,] conversiondata = new string[6, 3] { { "miles", "kilometers", "1.6093" }, { "kilometers", "miles", ".6214" }, { "feet", "meters", ".3048" }, { "meters", "feet", "3.2808"}, {"inches", "centimeters", "2.54"}, {"centimeters", "inches", ".3937"} };

that said. time user changes value of combobox, labels should change.

as such, selected 2 label controls in group, , clicked align rights button on toolbar. should align them correctly, after labels alter handler, yes?

well, not line correctly, shown here: .

as added note- grouping them , using left align button on toolbar work properly, shown here: .

what have done wrong?!

c# combobox

No comments:

Post a Comment