I have an application I am developing that has a Combo Box that is
intended to show a list of available tables in the selected DSN. I
have put code in the control's DropDown event handler to clear the
item list and reload it from the currently specified DSN (in a Text
Box control on the same form). This works well.
BUT ... if the specified DSN is invalid, I can display an appropriate
error message, but then then empty dropdown list is still displayed. I
have tried to suppress it by setting the control's DroppedDown
property to false if the error is encountered, but the empty dropdown
list is still being displayed and I have to click on the dropdown
button again to make it go away. What is also interesting is when I
click on the dropdown button to make it go away, the DropDown event
does not fire, only when it is first clicked.
So, how do I un-drop down a drop down? 6 1424
If there is an error, you could just hide the drop down list to prevent the
user from using it.
Adrian.
--
[Please mark my answer if it was helpful to you]
"za***@construction-imaging.com" wrote:
I have an application I am developing that has a Combo Box that is
intended to show a list of available tables in the selected DSN. I
have put code in the control's DropDown event handler to clear the
item list and reload it from the currently specified DSN (in a Text
Box control on the same form). This works well.
BUT ... if the specified DSN is invalid, I can display an appropriate
error message, but then then empty dropdown list is still displayed. I
have tried to suppress it by setting the control's DroppedDown
property to false if the error is encountered, but the empty dropdown
list is still being displayed and I have to click on the dropdown
button again to make it go away. What is also interesting is when I
click on the dropdown button to make it go away, the DropDown event
does not fire, only when it is first clicked.
So, how do I un-drop down a drop down?
Maybe: ComboBox.Refresh
"za***@construction-imaging.com" wrote:
I have an application I am developing that has a Combo Box that is
intended to show a list of available tables in the selected DSN. I
have put code in the control's DropDown event handler to clear the
item list and reload it from the currently specified DSN (in a Text
Box control on the same form). This works well.
BUT ... if the specified DSN is invalid, I can display an appropriate
error message, but then then empty dropdown list is still displayed. I
have tried to suppress it by setting the control's DroppedDown
property to false if the error is encountered, but the empty dropdown
list is still being displayed and I have to click on the dropdown
button again to make it go away. What is also interesting is when I
click on the dropdown button to make it go away, the DropDown event
does not fire, only when it is first clicked.
So, how do I un-drop down a drop down?
On Jul 25, 11:32 pm, Tracks <Tra...@discussions.microsoft.comwrote:
Maybe: ComboBox.Refresh
Thenks, but it didn't help.
>
"za...@construction-imaging.com" wrote:
I have an application I am developing that has a Combo Box that is
intended to show a list of available tables in the selected DSN. I
have put code in the control's DropDown event handler to clear the
item list and reload it from the currently specified DSN (in a Text
Box control on the same form). This works well.
BUT ... if the specified DSN is invalid, I can display an appropriate
error message, but then then empty dropdown list is still displayed. I
have tried to suppress it by setting the control's DroppedDown
property to false if the error is encountered, but the empty dropdown
list is still being displayed and I have to click on the dropdown
button again to make it go away. What is also interesting is when I
click on the dropdown button to make it go away, the DropDown event
does not fire, only when it is first clicked.
So, how do I un-drop down a drop down?- Hide quoted text -
- Show quoted text -
On Jul 26, 8:40 am, za...@construction-imaging.com wrote:
On Jul 25, 11:32 pm, Tracks <Tra...@discussions.microsoft.comwrote:
Maybe: ComboBox.Refresh
Thenks, but it didn't help.
"za...@construction-imaging.com" wrote:
I have an application I am developing that has a Combo Box that is
intended to show a list of available tables in the selected DSN. I
have put code in the control's DropDown event handler to clear the
item list and reload it from the currently specified DSN (in a Text
Box control on the same form). This works well.
BUT ... if the specified DSN is invalid, I can display an appropriate
error message, but then then empty dropdown list is still displayed. I
have tried to suppress it by setting the control's DroppedDown
property to false if the error is encountered, but the empty dropdown
list is still being displayed and I have to click on the dropdown
button again to make it go away. What is also interesting is when I
click on the dropdown button to make it go away, the DropDown event
does not fire, only when it is first clicked.
So, how do I un-drop down a drop down?- Hide quoted text -
- Show quoted text -
Alt + Down will toggle the drop down list up or down so you could
experiment with either SendKeys.Send or even try using the SendMessage
API to tell the combobox's handle to try to force the drop down to
hide.
Good Luck!
Thanks,
Seth Rowe
IIRC, setting DroppedDown in the handler is too soon, and it doesn't
work. You could try adding a delay, either using this.BeginInvoke, or
a short timer?
Marc
On Jul 26, 9:14 am, rowe_newsgroups <rowe_em...@yahoo.comwrote:
On Jul 26, 8:40 am, za...@construction-imaging.com wrote:
On Jul 25, 11:32 pm, Tracks <Tra...@discussions.microsoft.comwrote:
Maybe: ComboBox.Refresh
Thenks, but it didn't help.
"za...@construction-imaging.com" wrote:
I have an application I am developing that has a Combo Box that is
intended to show a list of available tables in the selected DSN. I
have put code in the control's DropDown event handler to clear the
item list and reload it from the currently specified DSN (in a Text
Box control on the same form). This works well.
BUT ... if the specified DSN is invalid, I can display an appropriate
error message, but then then empty dropdown list is still displayed. I
have tried to suppress it by setting the control's DroppedDown
property to false if the error is encountered, but the empty dropdown
list is still being displayed and I have to click on the dropdown
button again to make it go away. What is also interesting is when I
click on the dropdown button to make it go away, the DropDown event
does not fire, only when it is first clicked.
So, how do I un-drop down a drop down?- Hide quoted text -
- Show quoted text -
Alt + Down will toggle the drop down list up or down so you could
experiment with either SendKeys.Send or even try using the SendMessage
API to tell the combobox's handle to try to force the drop down to
hide.
The Alt Down does work from the keyboard. So I put an:
SendKeys.Send("%{down}")
in the DropDown event error branch, but alas, it does not appear to
have any effect.
It's almost like the dropdown occurs AFTER and user code in the
DropDown event, and there is not a DroppedDown event to put code in to
undrop it.
ARGHHH! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Rob Baxter |
last post by:
I have a linux server which is hosting several very large (~20GB)
databases. In order to save some disk space I dropped an index on one
of the larger (InnoDB) tables because it is no longer needed....
|
by: joe |
last post by:
I have an image database that I'd like to populate by dragging an image
off the desktop and
dropping onto a form (cut/paste would work equally as well)
Any suggestions?
Thanks,
Joe
|
by: Don Wash |
last post by:
Hi There!
I have a Server-side Drop-down box in ASP.NET (VB) page. What do I do to
widen the Drop down box's Pull-Down list's width?
I'm not talking about the Drop-down box's width but the box...
|
by: Yoshitha |
last post by:
hi
I have 2 drop down lists in my application.1st list ontains itmes like
java,jsp,swings,vb.net etc.2nd list contains percentage i.e it conatains the
items like 50,60,70,80,90,100.
i will...
|
by: Scott |
last post by:
Hi,
I need to programmatically drop the .NET DateTimePicker calendar. I did
this in VB6 by doing the following:
SendMessage DTDateTime.hwnd, WM_KEYDOWN, VK_F4, 0
This worked because the F4...
|
by: Ross Mallett |
last post by:
I have to drop large numbers of test tables (> 200) fairly often. This
operation seems to be very slow.
Is there some way to speed up the process of dropping tables?
|
by: sat |
last post by:
hi all!
I have a doubt regarding the dropping of a column.
As i've seen, we have an option like
"alter table <table namedrop column <column name>" in
oracle.
Do we have any method in db2 to drop...
|
by: TycoonUK |
last post by:
Hi,
As I do not have IE7 on my computer, I was wondering if there is a
fault in my CSS Menu when using IE7.
Please can someone look at my site - http://www.worldofmonopoly.co.uk
and tell me...
|
by: zacks |
last post by:
I have an application I am developing that has a Combo Box that is
intended to show a list of available tables in the selected DSN. I
have put code in the control's DropDown event handler to clear...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |