B
Bob Altman
How do I bind a value from My.Settings to a property on a control on a
Windows form?
I've created a setting called My.Settings.Value1 of type String. Now I want
to create a "Settings" dialog box that allows the user to view or change
My.Settings.Value1.
I added My.MySettings as a Data Source.
I created a simple dialog box with Ok and Cancel buttons.
I dragged Value1 from the Data Sources window to the form. The designer
dutifully created a TextBox with its Text property wired to a BindingSource,
plus a BindingNavigator (the purpose of which is a mystery to me).
I run my application, display the dialog box, type something into the
TextBox, and click the Ok button. In the Ok button's Click event handler,
My.Settings.Value1 contains an empty string. (Yes I called
MySettingsBindingSource.EndEdit before I examined the value of
My.Settings.Value1.)
Any suggestions? TIA!
- Bob
Windows form?
I've created a setting called My.Settings.Value1 of type String. Now I want
to create a "Settings" dialog box that allows the user to view or change
My.Settings.Value1.
I added My.MySettings as a Data Source.
I created a simple dialog box with Ok and Cancel buttons.
I dragged Value1 from the Data Sources window to the form. The designer
dutifully created a TextBox with its Text property wired to a BindingSource,
plus a BindingNavigator (the purpose of which is a mystery to me).
I run my application, display the dialog box, type something into the
TextBox, and click the Ok button. In the Ok button's Click event handler,
My.Settings.Value1 contains an empty string. (Yes I called
MySettingsBindingSource.EndEdit before I examined the value of
My.Settings.Value1.)
Any suggestions? TIA!
- Bob