|
-
Feb 6th, 2007, 11:17 PM
#1
Thread Starter
Lively Member
[2005] Change tabpage title when user starts editing
Hi all & very good morning!
I have something extra to implement in my form.
You know when you change something in your code in VS, the tab gets a '*' added at the end?
Well, I'd like to do something like that.
I have 4 tabpages; 1 tabpage contains the parent details (textboxes,combobox, etc) and another 3 tabpage with different datagridview.
I'd like the title of the tabpage to change as soon as the user enter something into the controlfield.
What i have so far in my code is not right. I'm sure not implementing the right event for this because when I step through, it didn't go. My questions are:
1) How to know if the user is editing any of the control fields in a tabpage
2) The ideal event to implement this.
Thanks in advance for your time.
Last edited by rim78; Feb 6th, 2007 at 11:23 PM.
-
Feb 6th, 2007, 11:37 PM
#2
Re: [2005] Change tabpage title when user starts editing
It will completely depend on the type of control(s). For a TextBox it would be TextChanged, for a ComboBox it would be SelectedIndexChanged or similar, etc., etc.
-
Feb 7th, 2007, 12:10 AM
#3
Thread Starter
Lively Member
Re: [2005] Change tabpage title when user starts editing
Hi jm
Yeah i saw that in the msdnlibrary and tried textbox1_textchanged event but it changes the tabpage title as soon as the form loads. and the title also change when i navigate through the records even when user didn't enter anything yet.
Hmm
-
Feb 7th, 2007, 12:46 AM
#4
Re: [2005] Change tabpage title when user starts editing
The TextChanged event of a TextBox is raised whenever the value of the Text property changes. Loading your data and navigating records will cause the Text property to change so the event is raised. It's up to you to allow for that. You could handle the RowChanged event of the underlying DataTable instead, but that is only raised when the new value is validated and sent to the table. That won't be until the user leaves a field they just edited.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|