473,473 Members | 1,833 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

ToolBar buttons by name?

Surely there must be some way to refer to a button on a
toolbar by its name.

I don't mean when the button is clicked, I can see how to do
that.

Depending on what's going on, I want to enable or disable
certain buttons. For example, it the user hasn't done
anything, disable the "cancel" button. After they start
typing, enable the "Cancel" button. When there's nothing to
save, disable the "Save" button.

I'm not yet sure how many buttons I'll have and what order
they'll be in. So, if I have to hard code their index
number, adding, deleting or rearranging buttons will be a
pain in the toolbar.

tia
Tom

--
E-mail correspondence to and from this address may be
subject to the
North Carolina Public Records Law and may be disclosed to
third parties.
Nov 20 '05 #1
3 1552
Hi,

This works.
ToolBarButton1.Enabled = False

Ken
----------------------
"Tom Williams" <To**********@NO-SPAMncmail.net> wrote in message
news:40***************@NO-SPAMncmail.net...
Surely there must be some way to refer to a button on a
toolbar by its name.

I don't mean when the button is clicked, I can see how to do
that.

Depending on what's going on, I want to enable or disable
certain buttons. For example, it the user hasn't done
anything, disable the "cancel" button. After they start
typing, enable the "Cancel" button. When there's nothing to
save, disable the "Save" button.

I'm not yet sure how many buttons I'll have and what order
they'll be in. So, if I have to hard code their index
number, adding, deleting or rearranging buttons will be a
pain in the toolbar.

tia
Tom

--
E-mail correspondence to and from this address may be
subject to the
North Carolina Public Records Law and may be disclosed to
third parties.

Nov 20 '05 #2
* Tom Williams <To**********@NO-SPAMncmail.net> scripsit:
Depending on what's going on, I want to enable or disable
certain buttons. For example, it the user hasn't done
anything, disable the "cancel" button. After they start
typing, enable the "Cancel" button. When there's nothing to
save, disable the "Save" button.


\\\
Me.ToolBarButton5.Enabled = False
///

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3
I need to feel stupid at least once a day.
Thanks.
"Ken Tucker [MVP]" wrote:
Hi,

This works.
ToolBarButton1.Enabled = False

Ken
----------------------
"Tom Williams" <To**********@NO-SPAMncmail.net> wrote in message
news:40***************@NO-SPAMncmail.net...
Surely there must be some way to refer to a button on a
toolbar by its name.

I don't mean when the button is clicked, I can see how to do
that.

Depending on what's going on, I want to enable or disable
certain buttons. For example, it the user hasn't done
anything, disable the "cancel" button. After they start
typing, enable the "Cancel" button. When there's nothing to
save, disable the "Save" button.

I'm not yet sure how many buttons I'll have and what order
they'll be in. So, if I have to hard code their index
number, adding, deleting or rearranging buttons will be a
pain in the toolbar.

tia
Tom

--
E-mail correspondence to and from this address may be
subject to the
North Carolina Public Records Law and may be disclosed to
third parties.


--
E-mail correspondence to and from this address may be subject to the

North Carolina Public Records Law and may be disclosed to third
parties.
Nov 20 '05 #4

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

Similar topics

11
by: N. Graves | last post by:
I have checked the "Alignment and Sizing" toolbar but when I want to use in on aligning several form object the toolbar buttons stay grayed out. What am I missing. Thanks! N. Graves
3
by: James Tran | last post by:
I created a toolbar, set the style of my button to be a dropdownbutton, and type in the button name in the text field. After I do this, what happens is that the dropdownbutton automatically...
3
by: Michael C | last post by:
How on earth do you disable ToolBar Buttons and change the images on ToolBar buttons at run-time? Thanks, Michael C.
2
by: Greg Burns | last post by:
I added a toolbar to a form and added one button. I made sure ShowToolTips = true for the Toolbar, and have set a tooltip for the button. The problem is the tooltip only shows after clicking...
9
by: Hugh | last post by:
after I changed the image size. I tried different combinations of images sizes and button sizes. I have tried both botton and the image in the same sizes or button size was larger than that of...
1
by: Curtis | last post by:
Somehow I'm just missing something. I don't know how to catch when a user clicks on an item in a dropdown list for a dropdown style button on a toolbar. I create a new app. Form1. Add a...
1
by: Alfredo Barrientos | last post by:
Hi, I have a little trouble trying to assign a Toolbar control to another toolbar variable control. I am getting my forms controls with this: for (int j = 0; j <= frmChild.Controls.Count -...
0
by: CrimeMaster | last post by:
Hi My IE toolbar is based on the Microsoft sample KKBar. I have draw a lot of buttons on it in which some are simply pushDown buttons and some are dropdowns.Beside this I have Made a Setting...
6
by: =?Utf-8?B?L2Rldi9udWxs?= | last post by:
Hello, i am using visual studio 2003 enterprise architect version. I am making apps for the .Net framework 1.1. While testing an interface, i discovered something strange. In this application...
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
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...
0
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 ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
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...

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.