473,404 Members | 2,213 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

uh, hello...

ok all you smart people and low level gurus

how do i detect the close of a combbox's drop down list?

there must be a way and i'm to dumb to figure it out.
Nov 20 '05 #1
14 1363
Nak
Hi there,

I took a look at the windows messages that are sent when the combo box
is closed but could not pick out any individual messages for closing the
box. So I'm not sure that checking the windows messages would work, out of
a matter of interest, why are you wanting to know when the box closes?

Nick.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
It seems you are not enabling Option Strict. Enable it in the project
properties and the compiler might find the error for you. Jobs a good'n!
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Nov 20 '05 #2
Cor
Nick,
Sorry, but I was thinking, that when you select an item in a Combo box, it
closes automaticly and could not find other ways to close it.
:-)
Cor
"Nak" <a@a.com> schreef in bericht
news:eY**************@TK2MSFTNGP12.phx.gbl...
Hi Cor,
> Use the SelectedIndexChanged
But if you don't change the selected item then the event is never raised.

Nick.

--

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ It seems you are not enabling Option Strict. Enable it in the project
properties and the compiler might find the error for you. Jobs a good'n!
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\

Nov 20 '05 #3
Nak
> Sorry, but I was thinking, that when you select an item in a Combo box, it
closes automaticly and could not find other ways to close it.


Yup, I understand, I wasn't having a pop honest :-) I'm just not sure what
he wants it for, I took a look at the windows messages etc and couldn't find
a way (maybe I'm just dumb, quite possible).

Nick.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
It seems you are not enabling Option Strict. Enable it in the project
properties and the compiler might find the error for you. Jobs a good'n!
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Nov 20 '05 #4
respectfully yes and thank you, and i'm sorry i missed the post

i am aware of the SelectedIndexChanged event but i thought it inadequate for
my purpose because it fired as the user scrolls through the list.

i am now thinking that i can test to see if the list is droped down, and if
so ignore the event.

i am trying to force the uses to drop the list down and click or press enter
to slelect an item, that is, i want to supress the ability for the user to
use the arrow keys to change the selection when the list is not dropped
down, and i want to ignore SelectedIndexChange when the list is dropped
down.

the net result is to ignore changes until the users has actually setteled on
a final selection yet not delay the processing by waiting until after the
user pressed tab to lose focus.

what brought this all about was a problem i encountered. the user is
selecting a client with the combobox and i have a lot of objects being
created and databases being queryed when the selection is made. as the user
scrolls through the selections the code was being run and the user would see
the result on the screen. this processing was unnecessary but not
detrimental, but after rapid changes (holding down the arrow key, for
example) i would get an "unspecified error" when trying to read the
database. the condition was terminal and the appliaction must be exited to
"reset" things.

my final solution (in theroy) was to desing a comboxbox that only fired the
"Change" event when the user was done browsing, signified by the close of
the drop down list.

hey, i'm a fun loving guy, but i (wronly) got fustrated when more discussion
is drawn concerning the theoritical inconsistancies of the concatenation
oprerator (who cares?).

peace
Nov 20 '05 #5
Nak
> hey, i'm a fun loving guy, but i (wronly) got fustrated when more
discussion
is drawn concerning the theoritical inconsistancies of the concatenation
oprerator (who cares?).


It's nothing personal. Do you not find the discussion highly entertaining?
I dream at night of discussions about string concatenation.....

Nick.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Having problems with you job?
You're marriage is on the rocks?
You can't sleep at night?
You have a drink and drugs addiction?
You are sexually impotent?
Then enable Option Strict!
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Nov 20 '05 #6
Cor
Your string?
Nov 20 '05 #7
debug.writeline "thank" & " you" & " all"
Nov 20 '05 #8
A method I've used successfully in the past is to start a timer when the
Change event is fired. Then put the time-consuming work in the timer event
(or call it from the timer event). The timer interval can be adjusted to
balance tolerance for rapid selection with responsiveness.

Just a thought.

Vincent

"Kenneth P. Graci" <kp*****@mindspring.com> wrote in message
news:Oj**************@TK2MSFTNGP09.phx.gbl...
respectfully yes and thank you, and i'm sorry i missed the post

i am aware of the SelectedIndexChanged event but i thought it inadequate for my purpose because it fired as the user scrolls through the list.

i am now thinking that i can test to see if the list is droped down, and if so ignore the event.

i am trying to force the uses to drop the list down and click or press enter to slelect an item, that is, i want to supress the ability for the user to
use the arrow keys to change the selection when the list is not dropped
down, and i want to ignore SelectedIndexChange when the list is dropped
down.

the net result is to ignore changes until the users has actually setteled on a final selection yet not delay the processing by waiting until after the
user pressed tab to lose focus.

what brought this all about was a problem i encountered. the user is
selecting a client with the combobox and i have a lot of objects being
created and databases being queryed when the selection is made. as the user scrolls through the selections the code was being run and the user would see the result on the screen. this processing was unnecessary but not
detrimental, but after rapid changes (holding down the arrow key, for
example) i would get an "unspecified error" when trying to read the
database. the condition was terminal and the appliaction must be exited to "reset" things.

my final solution (in theroy) was to desing a comboxbox that only fired the "Change" event when the user was done browsing, signified by the close of
the drop down list.

hey, i'm a fun loving guy, but i (wronly) got fustrated when more discussion is drawn concerning the theoritical inconsistancies of the concatenation
oprerator (who cares?).

peace

Nov 20 '05 #9
If you'd used Option Strict On.... (SCNR)

--
HTH,
-- Tom Spink, Über Geek

Please respond to the newsgroup,
so all can benefit
"Kenneth P. Graci" <kp*****@mindspring.com> wrote in message
news:uS*************@TK2MSFTNGP09.phx.gbl...
debug.writeline "thank" & " you" & " all"

Nov 20 '05 #10
Hi Nick,

||vb.net - windows forms
||
||I need to know when the dropdown list on my
||derived combobox closes.
||
||There is a DropDown event and a OnDropDown
||override, but I want to know when it closes.
||
||It is an ownerdrawn combobox, so i am handling
||the Drawitem event myself. DrawItem, however,
||does not always get called when the list closes,
||only when something needs drawn.
||
||I have trapped the several flovors of the
||PreProcessMessage events but none of them
||fire when the user clicks the list to make
||it close.
||
||any ideas?

Kenneth posted this yesterday but (presumably) no-one picked up on
the title he gave it: "ComboBox Un-DropDown event?" so he came bak
today with "uh, hello" and caught himself some help! I reckon there
must something in that marketing lore that says "it's all in the
packaging". :-)

Regards,
Fergus
Nov 20 '05 #11
Hi Kenneth,

The list gets closed:
When the following keys are pressed:
<Alt-Up>, <Esc>, <Enter>,
<Tab> (which triggers the Leave event)
When the Edit box is clicked.
When the same item in the List is clicked.
When a different item in the List is clicked.
When any other control is clicked (Leave event again)

There may be more that I haven't discovered.

You say that you're handling the DrawItem event so I guess that
some of the above are triggering it and some are not. I reckon you'll
have to give up chasing the list-close itself and focus on the events
that give rise to it.

Regards,
Fergus
Nov 20 '05 #12
> A method I've used successfully in the past is to start a timer when the
Change event is fired.


yeah, i've done that before too. i always felt this was kind of a hack (it
just 'seems' wrong).

anyway, i've solved my problem by restricting the user's ability to change
the selection without a dropdown box, and then raising my new
"SelectionChanged" event on <CR>, LostFocus, and SelectedIndexChanged when
the list is not dropped down.

works pretty good too, in that is acts in accordance with what the user
expects to happen.

who changes a combox box with the arrow keys without the list dropped down
anyway? i always thought that behavior was kind of dangerous, the user can
easily corrupt a field with an arrow key thinking they would move focus to
another field.

thanks
i'm now a little less dumb
Nov 20 '05 #13
cool. marketing rules.
Nov 20 '05 #14
Nak
> If you'd used Option Strict On.... (SCNR)

Provider of life :-)

Nick.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Having problems with you job?
You're marriage is on the rocks?
You can't sleep at night?
You have a drink and drugs addiction?
You are sexually impotent?
Then enable Option Strict!
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Nov 20 '05 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: AIM | last post by:
Error in msvc in building inheritance.obj to build hello.pyd Hello, I am trying to build the boost 1.31.0 sample extension hello.cpp. I can not compile the file inheritance.cpp because the two...
24
by: Andy Sutorius | last post by:
Has anyone successfully created a Hello World program without using Visual Studio.NET? If so, what IDE did you use and what namespaces did you import? Thanks! Andy Sutorius
2
by: bissatch | last post by:
Hi, I am trying to use JavaScript to write a table column on a web page. The code is as follows: <html> <head> <script> function displaycount() {
5
by: Daniel Crespo | last post by:
Is there a built-in method for transforming (1,None,"Hello!") to 1,None,"Hello!"? Thanks
10
by: fei.liu | last post by:
Consider the following sample code char * ptr = "hello"; char carray = "hello"; int main(void){ } What does the standard have to say about the storage requirement about ptr and carray? Is...
4
by: arnuld | last post by:
i am learning C and doing the exercise 1-1 of K&R2, where K&R ask to remove some parts of programme and experiment with error, so here i go: #include <stdio.h> int main () { printf('hello...
1
by: James T. Dennis | last post by:
You'd think that using things like gettext would be easy. Superficially it seems well documented in the Library Reference(*). However, it can be surprisingly difficult to get the external details...
0
by: devito | last post by:
hi there, for some days i try to build the boost.python tutorial "hello world" without bjam on winxp by using mingw. so i wrote a *.bat-file like the following: // --- snip...
0
Nepomuk
by: Nepomuk | last post by:
Hi everybody! As was suggested here, today should be Hello World Day! So, here's my Hello World Program in bash script: #!/bin/bash i=0; function hello { case $i in 0) echo 'H' i=`expr...
0
by: tosreejithp | last post by:
Hi, My first problem was i am not able to compiled a file from java script to java class.Now its clear and working fine..now i can convert a java script file to java class by Rhino Java Script...
0
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
Oralloy
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.