473,795 Members | 3,122 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Tabcontrol and Listview behave...

Hello
I am using a TabControl wich includes a ListView on each TabPage. On the
click event I use the text on each tab to fill the ListView with data. When
the user click on a TabPage a use the Validating event to validate the data
in the ListView.

Now to the problem, it seems that after the Validating event, the TabPage:s
focus will change, the clicked TabPage will be active but the problem is that
the Click event will not be fired. Why???

Is there anybody who have a solution to this??
Is there any event I can use to fire the click event on my on?? How will I
then now whitch page was clicket??

Many tanks!
Nov 16 '05 #1
2 2703
Hi Andreas,
Hello
I am using a TabControl wich includes a ListView on each TabPage. On the
click event I use the text on each tab to fill the ListView with data. When
the user click on a TabPage a use the Validating event to validate the data
in the ListView.

Now to the problem, it seems that after the Validating event, the TabPage:s
focus will change, the clicked TabPage will be active but the problem is that
the Click event will not be fired. Why???

Is there anybody who have a solution to this??
Is there any event I can use to fire the click event on my on?? How will I
then now whitch page was clicket??


Look in .NET docs for TabControl class.
There is an event: SelectedIndexCh anged.
and a property: SelectedIndex.

Handle that "event" and check the "property" to get what you want...
or i missed something.

HTH & Cheers!
Marcin
Nov 16 '05 #2
Thank you Marcin!

It solved my problem.... You saved my day!!! :D

// Andreas

"Marcin Grzębski" wrote:
Hi Andreas,
Hello
I am using a TabControl wich includes a ListView on each TabPage. On the
click event I use the text on each tab to fill the ListView with data. When
the user click on a TabPage a use the Validating event to validate the data
in the ListView.

Now to the problem, it seems that after the Validating event, the TabPage:s
focus will change, the clicked TabPage will be active but the problem is that
the Click event will not be fired. Why???

Is there anybody who have a solution to this??
Is there any event I can use to fire the click event on my on?? How will I
then now whitch page was clicket??


Look in .NET docs for TabControl class.
There is an event: SelectedIndexCh anged.
and a property: SelectedIndex.

Handle that "event" and check the "property" to get what you want...
or i missed something.

HTH & Cheers!
Marcin

Nov 16 '05 #3

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

Similar topics

1
2437
by: (Pete Cresswell) | last post by:
TabControl on the right side of a form with two tabs: Tab #1 contains two subforms that show some dynamic query results. Tab #2 contains a ListView that gets dynamically populated as the user navigates a TreeView on the left side of the form. The first time I load the ListView, if the tab containing it is not selected (i.e. the ListView is not visible) the screen draws the ListView's contents in the upper left portion of the form -...
0
1406
by: Bom | last post by:
Hi, I like to bind a collection to a listview-control. So the listview-control must behave like a datagrid. Is there somebody who has some code (C#) to do that or to extends the listview-control? Thanks, Bom
5
4509
by: Phill | last post by:
I've got a Listview control (Detail mode) that I'm adding rows to on another thread from a DB query. The result is about 32,000 rows ans takes a while to finish. I'm adding the rows like this : lv.Items.Add( lvi ); It seems the entire control is redrawing even though usually the new rows being added are not visible. I don't remember this being the case in Win32. Anyway w/ all the flickering going on the LV control is too
3
309
by: VJ | last post by:
I need to have a Tab Control with 4 tab pages. Each tab pages should have a certain list and list view controls. What these list view controls show depend on the tabpage. Do I have to create the control in each tabpage? Also, I will be allowing the application user to add thier own tab pages, which will carry same list and listview, but again what it shows depends on what tabpage they have added. How do I accomplish this without having to...
2
2523
by: Just Me | last post by:
Listview is Docked=Fill I set all column widths to -2 and it works as expected if the listview needs to be too wide for the window. That is, I get an H-scrollbar and the columns are the correct size. However, if the window (and thus the listview) is wider that the listview needs to be it makes the last column extra wide so that it fills the right side of the window.
2
1266
by: David | last post by:
I have mentioned this issue previously but as yet have not found a solution. In VB.Net 2003, I have 4 Listviews on a Tab. Each listview has the data source property set to point to a database table and the display member set to a field in that table. The program runs fine and all the information appears in the listviews as expected. If I deploy the application, the listviews still behave correctly.
0
1035
by: Juan Pedro Gonzalez | last post by:
Hi, I'm running mad with this issue, hope I can explain it correctlly. I've been developping a user control wich is very similar to the TabControl... Basically my control has two panels that act as containers: one for the buttons and the other one for something similar to the TabPages. For my pages I've declared:
0
1225
by: SCuM | last post by:
The tool tips on the tabs of a TabPage of a TabControl seem to behave differently than a normal ToolTip. I am trying to put a long string in but it keeps getting cut off. The same string works fine if I use a standard ToolTip Control. But I have to use the TabControl's implementation because I want it on a hover over the tab. This also seems to be fixed in VS2005 but I am using VS2003. Is there a work around or a way to lengthen the...
8
6387
by: nirdeshonline | last post by:
Hi, I have added a simple listbox in windows form under c# 2.0. It contains a collection of approx 10 strings as list items. Now when i resize the form whole listbox flickers. Please tell me any feasible solution, i need to use a checked listbox which also has same flickering problem on resize. Thanks & Regards
0
9519
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10439
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
10215
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
10165
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,...
0
6783
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
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
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
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
2
3727
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.