make dropdownlist box bigger

U

Uwe Hercksen

mcnewsxp said:
is there a way to make dropdownlist box bigger when it has focus?

Hello,

if you have an event procedure GotFocus for this dropdownlist, you may
try to change the size within that procedure. You will need the event
procedure LostFocus too to change the size back to the old value.

Bye
 
U

Uwe Hercksen

Peter said:
That said, from a UI point of view, it's generally a poor idea to have
controls resizing as focus moves around. That's a great way to confuse
users.

Hello,

it is also a great way to waste the power of the data and graphics
processor.

Bye
 
A

Arne Vajhøj

it is also a great way to waste the power of the data and graphics
processor.

Obviously it uses resources.

But I can not imagine it being significant. By human measure
it is quick to move the cursor from one control to another,
but by CPU measure it takes a long time.

Arne
 
M

mcnewsxp

If you are talking about the "display" part of the dropdown (the part with

the currently-selected value, if any, and the dropdown button), then

changing its size on focus would be a horrible UI behavior.



If you are talking about changing the width and/or height of the dropdown

LIST, then that's another matter entirely and I think it would be a

wonderful UI choice, because there's nothing worse than trying to choose an

item from a dropdown list when you can't see its entire text, especially

when there are others with similar text at the beginning.



By the way, what are you talking about? Web? Windows Forms? WPF? Kinda

important....

jeff - thanks. i am talking asp.net web. the DDL is part of a grid. i have 3 textboxes and 5 DDLs. in two of them i store a 5 digit numbers. but the users want to see the number and the description when they choose the number. the number is what they want to see in the control. so maybe not when the control has focus, but when it is clicked for selection...?
 
B

bradbury9

El miércoles, 24 de octubre de 2012 23:02:18 UTC+2, mcnewsxp escribió:
jeff - thanks. i am talking asp.net web. the DDL is part of a grid. i have 3 textboxes and 5 DDLs. in two of them i store a 5 digit numbers. but the users want to see the number and the description when they choose thenumber. the number is what they want to see in the control. so maybe notwhen the control has focus, but when it is clicked for selection...?

Take a look at Jquery and also javascript onmouseover event.
 
M

mcnewsxp

is there a way to make dropdownlist box bigger when it has focus?



tia,

mcnewsxp

this is getting close, but it doesn't do it while in edit mode which is what i want.

protected void gvATTENDANCE_RowDataBound1(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[4].Attributes.Add("onmouseover", "this.className='something'");
e.Row.Cells[4].Attributes.Add("onmouseout", "this.className='somethingelse'");
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top