Hi Guys
I am trying to get rid the comboboxes in my project and replace them with something that looks like a textbox but when mousehover event occurs on it then it just expands and shows all the values within it. And when the user selects a value then change that to something that looks like textbox and shows the value within it.
I got the below 6 highlighted steps from CJ_London :
1. create an unbound listbox control - I'll call it lstChoice
2. populate with your list of options
3. move the related label to above the lstChoice- ensure bottom of label is touching top of lstChoice
4. set the height of lstChoice to 0
5. in the lstChoice mousemove event put something like
if lstChoice.height=0 then lstChoice.height=3000 '(whatever height you want in twips - 567 twips=1cm)
6. in the section (header/footer/etc) mousemove event put
if lstChoice.height=3000 then lstChoice.height=0
don't forget to put some code in the lstChoice afterupdate event to take selected action - open form, run a report, whatever.
But now the problem with this is :
a. When the form is loaded then it just displays label and under that just a single line ...(I want the single line to be changed into something so that it looks like a textbox)
b. on the mouse hover event when the list is expanded and we select a particular value from it then it doesn't do anything and I want it to change back to textbox and the value should be showing in it.
Can anyone please help me with "a" and "b" steps ?
Thanks
I am trying to get rid the comboboxes in my project and replace them with something that looks like a textbox but when mousehover event occurs on it then it just expands and shows all the values within it. And when the user selects a value then change that to something that looks like textbox and shows the value within it.
I got the below 6 highlighted steps from CJ_London :
1. create an unbound listbox control - I'll call it lstChoice
2. populate with your list of options
3. move the related label to above the lstChoice- ensure bottom of label is touching top of lstChoice
4. set the height of lstChoice to 0
5. in the lstChoice mousemove event put something like
if lstChoice.height=0 then lstChoice.height=3000 '(whatever height you want in twips - 567 twips=1cm)
6. in the section (header/footer/etc) mousemove event put
if lstChoice.height=3000 then lstChoice.height=0
don't forget to put some code in the lstChoice afterupdate event to take selected action - open form, run a report, whatever.
But now the problem with this is :
a. When the form is loaded then it just displays label and under that just a single line ...(I want the single line to be changed into something so that it looks like a textbox)
b. on the mouse hover event when the list is expanded and we select a particular value from it then it doesn't do anything and I want it to change back to textbox and the value should be showing in it.
Can anyone please help me with "a" and "b" steps ?
Thanks