473,732 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CheckedListbox - change check event

Hi

Can't believe I've not been able to find the answer to this in the on-line
help.

I have a CheckedListBox which, via a timer control, is populated with the
names of files in a network folder. The "check mark" for each item in the
control is determined by the boolean value of a custom property field of the
file. That value is found using microsoft's dsofile.dll class.

That's the background. What's the problem?....the re doesn't seem to be any
"checked change" event for the CheckedListBox control. If my user changes the
check mark on one of the items in the CheckedListBox I want to trigger a
procedure to change the value of the file's custom property field

Changing the value is the easy bit, its all written and waiting to
go.....but I can't find a way to trigger the procedure when the check is
changed

Am I missing something ?

Any help would be appreciated

Thanks

Michael Bond
Jul 6 '06 #1
5 6864
"mabond" <ma****@discuss ions.microsoft. comwrote in message news:7A******** *************** ***********@mic rosoft.com...
Hi

Can't believe I've not been able to find the answer to this in the on-line
help.

I have a CheckedListBox which, via a timer control, is populated with the
names of files in a network folder. The "check mark" for each item in the
control is determined by the boolean value of a custom property field of the
file. That value is found using microsoft's dsofile.dll class.

That's the background. What's the problem?....the re doesn't seem to be any
"checked change" event for the CheckedListBox control. If my user changes the
check mark on one of the items in the CheckedListBox I want to trigger a
procedure to change the value of the file's custom property field

Changing the value is the easy bit, its all written and waiting to
go.....but I can't find a way to trigger the procedure when the check is
changed

Am I missing something ?

Any help would be appreciated

Thanks

Michael Bond
Did you try the ItemCheck event?
"Occurs when the checked state of an item changes"

--
Al Reid
Jul 6 '06 #2
Al

thanks for the reply ....... firstly no, I hadn't tried it (I did say I
thought there would be something I was missing!)

However, having found the event that I need it's now given me an entirely
different problem! Because I re-populate the control with a timer event, the
itemcheck event for every item in the box is being triggered every time the
control is refreshed (logical of course 'cos thats is what I've told it to
do!)

So it's abck to the drawing board and a re-think of my methodolgy for
dealing with this requirement.

Thanks again

Michael Bond
I believe under different circumstances that event would be what I n

"Al Reid" wrote:
"mabond" <ma****@discuss ions.microsoft. comwrote in message news:7A******** *************** ***********@mic rosoft.com...
Hi

Can't believe I've not been able to find the answer to this in the on-line
help.

I have a CheckedListBox which, via a timer control, is populated with the
names of files in a network folder. The "check mark" for each item in the
control is determined by the boolean value of a custom property field of the
file. That value is found using microsoft's dsofile.dll class.

That's the background. What's the problem?....the re doesn't seem to be any
"checked change" event for the CheckedListBox control. If my user changes the
check mark on one of the items in the CheckedListBox I want to trigger a
procedure to change the value of the file's custom property field

Changing the value is the easy bit, its all written and waiting to
go.....but I can't find a way to trigger the procedure when the check is
changed

Am I missing something ?

Any help would be appreciated

Thanks

Michael Bond

Did you try the ItemCheck event?
"Occurs when the checked state of an item changes"

--
Al Reid
Jul 6 '06 #3
When changing the checked status, you can "remove" the event handler then
"Add" it back when you are finished. I use the following for a similiar
situation when I am using the treeview control:

RemoveHandler tre_MusicSource .AfterCheck, AddressOf tre_MusicSource _AfterCheck

.....do your thing here

AddHandler tre_MusicSource .AfterCheck, AddressOf tre_MusicSource _AfterCheck
Dennis in Houston

Note: the sub "tre_MusicSourc e_AfterCheck is the name of the sub that
handles the check event for the treeveiw control named tre_MusicSource .

Hope this helps as I find this technique very useful.
"mabond" wrote:
Al

thanks for the reply ....... firstly no, I hadn't tried it (I did say I
thought there would be something I was missing!)

However, having found the event that I need it's now given me an entirely
different problem! Because I re-populate the control with a timer event, the
itemcheck event for every item in the box is being triggered every time the
control is refreshed (logical of course 'cos thats is what I've told it to
do!)

So it's abck to the drawing board and a re-think of my methodolgy for
dealing with this requirement.

Thanks again

Michael Bond
I believe under different circumstances that event would be what I n

"Al Reid" wrote:
"mabond" <ma****@discuss ions.microsoft. comwrote in message news:7A******** *************** ***********@mic rosoft.com...
Hi
>
Can't believe I've not been able to find the answer to this in the on-line
help.
>
I have a CheckedListBox which, via a timer control, is populated with the
names of files in a network folder. The "check mark" for each item in the
control is determined by the boolean value of a custom property field of the
file. That value is found using microsoft's dsofile.dll class.
>
That's the background. What's the problem?....the re doesn't seem to be any
"checked change" event for the CheckedListBox control. If my user changes the
check mark on one of the items in the CheckedListBox I want to trigger a
procedure to change the value of the file's custom property field
>
Changing the value is the easy bit, its all written and waiting to
go.....but I can't find a way to trigger the procedure when the check is
changed
>
Am I missing something ?
>
Any help would be appreciated
>
Thanks
>
Michael Bond
Did you try the ItemCheck event?
"Occurs when the checked state of an item changes"

--
Al Reid

Jul 6 '06 #4
Remove your event handler while populating the list and add it back in when
you're done.

Public Sub MyTimerEventHan dler(...)
RemoveHandler myListBox.ItemC heck, AddressOf MyItemCheckEven tHandler
' Do your stuff
AddHandler myListBox.ItemC heck, AddressOf MyItemCheckEven tHandler
End Sub

/claes

"mabond" <ma****@discuss ions.microsoft. comwrote in message
news:08******** *************** ***********@mic rosoft.com...
Al

thanks for the reply ....... firstly no, I hadn't tried it (I did say I
thought there would be something I was missing!)

However, having found the event that I need it's now given me an entirely
different problem! Because I re-populate the control with a timer event,
the
itemcheck event for every item in the box is being triggered every time
the
control is refreshed (logical of course 'cos thats is what I've told it to
do!)

So it's abck to the drawing board and a re-think of my methodolgy for
dealing with this requirement.

Thanks again

Michael Bond
I believe under different circumstances that event would be what I n

"Al Reid" wrote:
>"mabond" <ma****@discuss ions.microsoft. comwrote in message
news:7A******* *************** ************@mi crosoft.com...
Hi

Can't believe I've not been able to find the answer to this in the
on-line
help.

I have a CheckedListBox which, via a timer control, is populated with
the
names of files in a network folder. The "check mark" for each item in
the
control is determined by the boolean value of a custom property field
of the
file. That value is found using microsoft's dsofile.dll class.

That's the background. What's the problem?....the re doesn't seem to be
any
"checked change" event for the CheckedListBox control. If my user
changes the
check mark on one of the items in the CheckedListBox I want to trigger
a
procedure to change the value of the file's custom property field

Changing the value is the easy bit, its all written and waiting to
go.....but I can't find a way to trigger the procedure when the check
is
changed

Am I missing something ?

Any help would be appreciated

Thanks

Michael Bond

Did you try the ItemCheck event?
"Occurs when the checked state of an item changes"

--
Al Reid

Jul 6 '06 #5
Dennis

thanks for the reply .......

In the meantime I had a re-think on my technique.

My CheckedListBox was refreshing with the timer every 1000 ms. This was to
ensure the user (and there are more than one at any given time) would see the
most up to date content of the network folder in question. I've now replaced
the timer event with a filesystem watcher. In that way the CheckedListBox
only refreshes in the event of a change to the folder or any of its contents
and not every second.

Thanks to you and to Al for helping out with suggestions. Much appreciate
the help

Regards

Michael Bond
"Dennis" wrote:
When changing the checked status, you can "remove" the event handler then
"Add" it back when you are finished. I use the following for a similiar
situation when I am using the treeview control:

RemoveHandler tre_MusicSource .AfterCheck, AddressOf tre_MusicSource _AfterCheck

....do your thing here

AddHandler tre_MusicSource .AfterCheck, AddressOf tre_MusicSource _AfterCheck
Dennis in Houston

Note: the sub "tre_MusicSourc e_AfterCheck is the name of the sub that
handles the check event for the treeveiw control named tre_MusicSource .

Hope this helps as I find this technique very useful.
"mabond" wrote:
Al

thanks for the reply ....... firstly no, I hadn't tried it (I did say I
thought there would be something I was missing!)

However, having found the event that I need it's now given me an entirely
different problem! Because I re-populate the control with a timer event, the
itemcheck event for every item in the box is being triggered every time the
control is refreshed (logical of course 'cos thats is what I've told it to
do!)

So it's abck to the drawing board and a re-think of my methodolgy for
dealing with this requirement.

Thanks again

Michael Bond
I believe under different circumstances that event would be what I n

"Al Reid" wrote:
"mabond" <ma****@discuss ions.microsoft. comwrote in message news:7A******** *************** ***********@mic rosoft.com...
Hi

Can't believe I've not been able to find the answer to this in the on-line
help.

I have a CheckedListBox which, via a timer control, is populated with the
names of files in a network folder. The "check mark" for each item in the
control is determined by the boolean value of a custom property field of the
file. That value is found using microsoft's dsofile.dll class.

That's the background. What's the problem?....the re doesn't seem to be any
"checked change" event for the CheckedListBox control. If my user changes the
check mark on one of the items in the CheckedListBox I want to trigger a
procedure to change the value of the file's custom property field

Changing the value is the easy bit, its all written and waiting to
go.....but I can't find a way to trigger the procedure when the check is
changed

Am I missing something ?

Any help would be appreciated

Thanks

Michael Bond
>
Did you try the ItemCheck event?
"Occurs when the checked state of an item changes"
>
--
Al Reid
>
>
>
Jul 6 '06 #6

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

Similar topics

2
3041
by: Danny | last post by:
Hello I am trying to create a separate listbox and fill it with items based on what is in another field in a database. This field is bound to a field in the underlying database. But the data is changed from another list box that is a pulldown of the 3 items. This way they are forced to select one of the 3 items. So when the field updates based on the item chosen, why doesnt it cause the "on change event" to happen? The field has...
1
8932
by: Bijoy Thulasidharan | last post by:
Hi , Hope you should be able to help us out with the below issue Before subscribing to a delegate like this cell.OnGridCellSelected += new System.EventHandler(_OnGridCellSelected); we would like to check whether it was already subscribed to .
1
1248
by: Somyos | last post by:
How can I check event clicking the 'X' button in the upper right hand corner of a window. and call function or sub before close web page. I'm using Asp.net on VS.NET Thank.
4
3421
by: mark | last post by:
is it possible to change an elements Z-INDEX value on an onclick event in codebehind ? id like to change the posistion of a datagrid once a button has been pressed cheers mark
1
2603
by: tshad | last post by:
Is there a way to change the onClick event of a LinkButton? At the moment, I am using 2 buttons that I toggle the visibility on and off. I would like to use just one button, if possible and just change the onClick event as well as the ImageUrl during postback. I tried it but got the message:' Compiler Error Message: BC30390: 'System.Web.UI.WebControls.ImageButton.Protected Overridable Sub OnClick(e
10
3306
by: jerry.ranch | last post by:
I have a series of comboboxes on a form that are used to display forms in DS view (theres a qry behind it all). This is working well for me. Some people like to see the data in DS view, some in normal form view. I know they have the option to change that, but I trying to make this as user friendly as possible (and to learn about VBA for myself) So I thought I'd use two option buttons to identify this choice ........one for Forms view,...
1
2162
by: Huahe | last post by:
Hi, I have an checkedlistbox with a lot of items, so there is a vertical scrollbar in the checkedlistbox. I want to make the checkedlistbox invisible when the mouseleave event goes off. The mouseleave event goes off when I move the mouse to the scrollbar. Can someone explain this to me? Isn't the scrollbar a part of the checkedlistbox? -- Huahe
1
12667
by: QuickBooksDev | last post by:
VB.NET 2005 DataGridView Checkbox - Check Event need to know check status I would like to use the DataGridView Checkbox like a normal checkbox. When someone clicks on it I would expect that I could get a checked or changed event and be able to test if the box was checked or unchecked. For a normal checkbox. When it is checked you can test chk.checked and it is the current visible stated. Someone checks it and your test for chk.checked...
1
4179
by: =?Utf-8?B?UGF0cmljaw==?= | last post by:
In C# I can check whether an event instance is nothing or not public event SomeEvent SomeClickEvent; if (SomeClickEvent != null) { } But when I do this in VB it returns an error message Public Event SomeClickEvent As SomeEvent
0
8946
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9447
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9307
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9235
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6735
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3261
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.