473,888 Members | 1,448 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Event When User Clicks On A Control On A Tab's Page

I have a several paged tab control on my form.

On each page, there are several different controls. One page may have
5 controls and the other may have 10.

Can I run specific code when one of those controls on a particular page
is clicked.

I dont have to have to put code in each controls on click event and the
Tabs Click event only fires when you click "outside" of the actual
control and somewherre on a blank part of the tab page.

Basically - I've placed a bunch of text boxes (with a flat effect) to
make them look like command buttons. Then when a user selects the
control - I want the background of the selected control to turn a
different colors to show its been selected. Ofcourse the code would
have to cycle through the rest of the controls to make sure that the
other "command buttons" are set to the unselected color.

I know option boxes would be a lot easier - but I am trying something a
little different.
Thanks,
Brian

Jan 12 '06 #1
1 1822
BerkshireGuy wrote:
Can I run specific code when one of those controls on a particular page
is clicked.


Use the tab on change event. Each page in a tab control has a page
index property value, which is on the format tab of the page properties
window. I use it like this:

Private Sub tabWo_Change()

'If value is 9 (the advanced custom page), run the following afterupdate
event to get the rowsource for the list box

If Me.tabWo.Value = 9 Then

Me.subAdv.Form. fraOraClause_Af terUpdate

End If

End Sub

You may be able to do it by referring to other properties, but the above
works fine for me.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Jan 12 '06 #2

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

Similar topics

2
22025
by: Pete | last post by:
I have some funky form/event behavior. Access 97. Split frontend/backend, using Access security. I have the same behavior (or lack of behavior) for the pag_Click() event of two separate pages on different menu forms. Details: frmTRNMenu is the main menu of the application. It uses tabbed pages to logically separate menu items. The last tab on the list is different - it has an image and then "O&M". Clicking on this last page will...
0
3185
by: Diane Yocom | last post by:
I'm very new to ASP.Net and probably jumped in a little over my head, but... I'm trying to create a user control that will control navigation through my site. It's sortof like Amazon.com, where there are tabs at the top with "submenu" buttons showing below the selected tab. The data that defines the tabs and submenus is stored in an XML file and I'm using nested repeaters to build them dynamically. I've got it working pretty well, except...
0
2441
by: Gary Shell | last post by:
I am experiencing some strange behavior between a UserControl's validating event and a treeview control. Initially, I thought it was related to an issue in the Knowledgebase article 810852 (http://support.microsoft.com/kb/810852), but then I realized that the hotfix mentioned was in .Net v1.1, which I am using. I took the sample from that article and recreated the situation I see in my application. (Code included below.) If you run the...
3
1319
by: Phillip N Rounds | last post by:
In diagnosing a problem, I noted that a button_click event gets run only after the page Page_Load event of the post back. (VS 2003, ASPNET 1.1, C#) Can this be correct? I'm trying to set session variables in a Button_Click event which determines how the page is supposed to appear in the PostBack, so of course it fails. Where should I put my code so that the session variables are re-set before the PostBack?
2
1535
by: weboweb | last post by:
Hail the experts!!! I'm creating a web user control which displays a hierarchical tree of items from an xml string passed to the control (from the host page) through an exposed property. This xml gets created in the Page_Load method of the host page Each tree item displayed by the control is a LinkButton object. This LinkButton fires a CommandEventHandler event (when the user
5
2175
by: rn5a | last post by:
Consider the following user control which resides in Address.ascx: <script runat="server"> Public Property Address() As String Get Address = txtAddress.Text End Get Set(ByVal value As String) txtAddress.Text = value End Set
3
1546
by: =?Utf-8?B?U2hhd24=?= | last post by:
Here is what i am trying to accomplish. I have a group of user defined controls and i have a form. the form has a tab control and a menubar. the user defined controls will be add one to a tab page. what i want to do is create a class that will manage the tab control. it will have methods that the menu can use to have the control added without creating the control, that will be handled by the manager. in a sense i want to have the form...
2
8564
by: Mark F. | last post by:
I have two tab controls (four tabpages each) and each tab control is in a splitter panel (horiz orientation). I added a event handlers to handle the selected tab event. The upper tab control works when every tab is selected. The lower tab control only seems to work when the first three tabs are selected, not the last. Any ideas why? Thanks, Mark
6
1684
by: =?Utf-8?B?cmFuZHkxMjAw?= | last post by:
I have a tab control which has several tab pages. At run-time, switching between the tab pages can take as long as a few seconds. Any suggestions on what I can get to fire at the instant the user clicks on the TabControl? All the event handlers I've tried so far (Click, MouseClick, SelectedIndexChanged) only fire after the tab page actually changes. In case it's not obvious, the user are okay with waiting a few seconds if
0
9961
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
11182
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
10778
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...
0
9597
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7148
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
5824
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
6014
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4642
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
3252
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.