473,387 Members | 1,606 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 1756
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_AfterUpdate

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
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...
0
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...
0
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...
3
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...
2
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...
5
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)...
3
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...
2
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...
6
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...

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.