473,385 Members | 1,337 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,385 software developers and data experts.

ToolbarButton Name Property

Hi. I am trying to access the names of the toolbar buttons in order to
match to correct button name passed to a function. However, there is no
..Name property on a ToolBarButton control. Is there any other way to access
the name of the toolbarbutton?

Thanks.

-Barry
Nov 20 '05 #1
5 1270
"Barry Gast" <ba****@nycap.rr.com> schrieb
Hi. I am trying to access the names of the toolbar buttons in order
to match to correct button name passed to a function. However, there
is no .Name property on a ToolBarButton control. Is there any other
way to access the name of the toolbarbutton?


A ToolBarButton object does not have a name. References can be compared
using the Is operator, but why do you need this?
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2
I am trying to setup user security on a form. I have a database of control
names that I want to enable or disable based on the user's access rights.
I've written a function that handles all the other control objects (text
boxes, grids, combo boxes, command buttons, etc.) But, I cannot get to the
tool bar buttons off of a name.

I guess for tool bar buttons, I could use the index to reference the button.
But then I'd also have to store the toolbar name in my database table, which
would require a table change. And we all know how much DBA's like to make
table changes... ;o)

-Barry
"Armin Zingler" <az*******@freenet.de> wrote in message
news:el**************@TK2MSFTNGP09.phx.gbl...
"Barry Gast" <ba****@nycap.rr.com> schrieb
Hi. I am trying to access the names of the toolbar buttons in order
to match to correct button name passed to a function. However, there
is no .Name property on a ToolBarButton control. Is there any other
way to access the name of the toolbarbutton?


A ToolBarButton object does not have a name. References can be compared
using the Is operator, but why do you need this?
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #3
"Barry Gast" <ba****@nycap.rr.com> schrieb
I am trying to setup user security on a form. I have a database of
control names that I want to enable or disable based on the user's
access rights. I've written a function that handles all the other
control objects (text boxes, grids, combo boxes, command buttons,
etc.) But, I cannot get to the tool bar buttons off of a name.

I guess for tool bar buttons, I could use the index to reference the
button. But then I'd also have to store the toolbar name in my
database table,
I thought you *are* storing the toolbar name in the database.
which would require a table change. And we all know
how much DBA's like to make table changes... ;o)


:)

What about storing the ToolbarButton references in a Hashtable? Use the name
as the key.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #4
The hash table is a good idea. I will explore that option. I will also
have to do this for menu items since they do not have an accessible name
property either.

Thanks.

-Barry

"Armin Zingler" <az*******@freenet.de> wrote in message
news:uS*************@tk2msftngp13.phx.gbl...
"Barry Gast" <ba****@nycap.rr.com> schrieb
I am trying to setup user security on a form. I have a database of
control names that I want to enable or disable based on the user's
access rights. I've written a function that handles all the other
control objects (text boxes, grids, combo boxes, command buttons,
etc.) But, I cannot get to the tool bar buttons off of a name.

I guess for tool bar buttons, I could use the index to reference the
button. But then I'd also have to store the toolbar name in my
database table,
I thought you *are* storing the toolbar name in the database.
which would require a table change. And we all know
how much DBA's like to make table changes... ;o)


:)

What about storing the ToolbarButton references in a Hashtable? Use the

name as the key.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #5
* "Barry Gast" <ba****@nycap.rr.com> scripsit:
Hi. I am trying to access the names of the toolbar buttons in order to
match to correct button name passed to a function. However, there is no
.Name property on a ToolBarButton control. Is there any other way to access
the name of the toolbarbutton?


\\\
Private Sub ToolBar1_ButtonClick( _
ByVal sender As System.Object, _
ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs _
) Handles ToolBar1.ButtonClick
Select Case True
Case e.Button Is Me.ToolBarButton1
Nov 20 '05 #6

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

Similar topics

0
by: cody | last post by:
i can't figure out how to manually open the DropDown menu which is associated to my ToolBarbutton. i want to open it when the user presses a certain key. -- cody Freeware Tools, Games and...
0
by: Dana Epp | last post by:
I have a ToolBarButton that when I set it to disabled (button.Enabled = false;) causes a really ugly gray masking effect to take place. This is normal and the intended way of the button, but I...
1
by: R.Balaji | last post by:
Hi, We are developing a windows application using c#. We have created a toolbar with some toolbar buttons. When we disable the toolbar button, the toolbar button image should be displayed...
1
by: geoff | last post by:
I am trying to learn how to create my own controls. I want to create my own toolbar which would be similar to the .net toolbar except that my version would allow 3 images per button (off, over,...
1
by: Tulasi | last post by:
Is there any possibility to set ToolBarButton back color.
2
by: Peter Rilling | last post by:
It seems to me that the ToolBarButton should be a control, but instead it inherits from Component. Is there a reason this could not have inherited from Control since really a ToolBarButton is...
0
by: Brian Binnerup | last post by:
Hi. I am using the ms:ToolBar control on one of our products, and now a customer whishes for it to be with a dark blue background - I can do that by specifying a style on the ms:ToolBar tag -...
4
by: Ahmed | last post by:
Hi everyone, Is there a way to add a toolbarbutton with dropdown menu similar to the mail button in IE? In another word, when the chevron is part of the button not beside it. Thanks Ahmed
0
by: Steven | last post by:
Hi, I have a toolbar control with several buttons in ToolBarButton class. How can I change the text color of the ToolBarButton control in VB.NET 2003? Thanks! Steven
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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...

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.