473,406 Members | 2,281 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,406 software developers and data experts.

User Inherited Controls Question

Hello all I have a question I'm hoping someone can shed some light on. I have
2 user Inherited Controls on a form. When I click 1 inherited control I would
like to change the text of the other Inherited Control. Is there anyway to do
this? For example, I have an ADD button which is inherited and a EXIT button
which is inherited. The reason I made them inherited is because I want to use
the function of these buttons in other forms and don't want to find myself
rewriting the same code. I would like for the text of the EXIT button to
change when I click the ADD button and vice versa for the EXIT. Can someone
please help? Your advice and suggestions are welcomed.

Thanks!
--
TC
Sep 17 '05 #1
2 1272
Ron
I assume you are inheriting from another form. On the base class, handle the
Click event for the command buttons and change the Text property accordingly.

"Terrance" wrote:
Hello all I have a question I'm hoping someone can shed some light on. I have
2 user Inherited Controls on a form. When I click 1 inherited control I would
like to change the text of the other Inherited Control. Is there anyway to do
this? For example, I have an ADD button which is inherited and a EXIT button
which is inherited. The reason I made them inherited is because I want to use
the function of these buttons in other forms and don't want to find myself
rewriting the same code. I would like for the text of the EXIT button to
change when I click the ADD button and vice versa for the EXIT. Can someone
please help? Your advice and suggestions are welcomed.

Thanks!
--
TC

Sep 17 '05 #2
HEY RON:
No I'm not inheriting from another form.
--
TC
"Ron" wrote:
I assume you are inheriting from another form. On the base class, handle the
Click event for the command buttons and change the Text property accordingly.

"Terrance" wrote:
Hello all I have a question I'm hoping someone can shed some light on. I have
2 user Inherited Controls on a form. When I click 1 inherited control I would
like to change the text of the other Inherited Control. Is there anyway to do
this? For example, I have an ADD button which is inherited and a EXIT button
which is inherited. The reason I made them inherited is because I want to use
the function of these buttons in other forms and don't want to find myself
rewriting the same code. I would like for the text of the EXIT button to
change when I click the ADD button and vice versa for the EXIT. Can someone
please help? Your advice and suggestions are welcomed.

Thanks!
--
TC

Sep 17 '05 #3

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

Similar topics

0
by: Jim | last post by:
I am having some trouble with user controls and would appreciate any input / advice on where to go with this... :) 1. The first problem, and perhaps the root of the others, is that I have...
0
by: Jim | last post by:
I am having some trouble with user controls and would appreciate any input / advice on where to go with this... :) 1. The first problem, and perhaps the root of the others, is that I have...
4
by: Paradox | last post by:
Hey, I'm trying to figure out what situations call for the use of a derived form control such as: public class myListBox : System.Windows.Forms.ListBox and what situations call for the use...
1
by: ABC | last post by:
I write a Base Web User Control which contains several public properties and a Inherited Web User Control which only have some codes in new method. When I use the Inherited Web User Control on Web...
1
by: Philippe Meunier | last post by:
Ok, I already asked a question similar to this one but didn't found any answer ! I've a solution with 2 projects in it. One of the project contains Usercontrols and Inherited Controls. I work...
8
by: Spam Trap | last post by:
I am getting strange resizing problems when using an inherited form. Controls are moving themselves seemingly randomly, but reproducibly. "frmBase" is my base class (a windows form), and...
2
by: Terrance | last post by:
Hello all I have a question I'm hoping someone can shed some light on. I have 2 user Inherited Controls on a form. When I click 1 inherited control I would like to change the text of the other...
0
by: MikeY | last post by:
Hi everyone, I posted a question very early today, but maybe I wasn't articulate enough. Hopefully this will illicit a response I've created a windows form and a User Control. This is a...
3
by: MikeY | last post by:
Hi everyone, I'm trying to figure out, on my windows form, of what is the best way to add various custom controls at various times during run-time. The problem is that they will need to be in...
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: 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
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...
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.