Hi All
I have two problems related to persistent settings in my application.
They are kind of similar so I have included them in the same post.
I have put a mini project here:
http://www.kevinandkiran.com/BindingTest.zip
so that you can see what I am talking about. I think the cause is a
basic lack of understanding of databinding on my behalf, but lets see.
Problem 1 - Making a ToolStripButton bindable doesn't work.
MS didn't make the ToolStripButton bindable and I need to store
whether or not a button is checked when the program exits. I have
followed the example here:
http://blogs.msdn.com/jfoscoding/arc...23/507164.aspx
I add my new BindableToolStripButton to my form, added a property to
my ApplicationSettingsBase class (UserSettings) and then bind the two
together with:
ToolStripButton1.DataBindings.Add(New Binding("Checked", us,
"tsb_Checked"))
I also added a console output when the value of tsb_checked changes.
Basically I would expect that when I click the toolStripButton it will
print a line to the console, but it doesnt.
I also added "implements System.ComponentModel.INotifyPropertyChanged"
and raise the event when the CheckChanged event is fire. Still no
luck.
So I am now confused. what am I doing wrong?
Problem 2 - binding to a property in the current control
This is very similar to the first problem, except the property is in
the control as opposed to a child control.
When you click the button it should change the property "More_Text" to
the current time.
However, what happens is, click it once and it prints out the default
value, but any further clicks dont do anything.
The help files have a reasonable coverage on the whole application
settings and all that but I can't find anything about my problem, so I
hope somebody can please help me!
Thanks in advance
Kevin