Hi all,
Can i get the Name of a menu object in the Click event handler?
tnx for any help 6 4461
On 2004-12-12, Rob Willaar <r.*******@xs4a ll.nl> wrote: Hi all,
Can i get the Name of a menu object in the Click event handler?
tnx for any help
Yes... Cast the sender to MenuItem and you can access the name
property.
--
Tom Shelton [MVP]
Tnx for your reply Tom
A MenuItem does not have a name property.
I try this:
Dim x As MenuItem
x = CType(sender, MenuItem)
x does not have a name property...
Because i'm building a multilingual app i can't use the text property..
"Tom Shelton" <to*@YOUKNOWTHE DRILLmtogden.co m> schreef in bericht
news:ea******** ******@tk2msftn gp13.phx.gbl... On 2004-12-12, Rob Willaar <r.*******@xs4a ll.nl> wrote: Hi all,
Can i get the Name of a menu object in the Click event handler?
tnx for any help
Yes... Cast the sender to MenuItem and you can access the name property.
-- Tom Shelton [MVP]
Tom,
"Tom Shelton" <to*@YOUKNOWTHE DRILLmtogden.co m> schrieb: Can i get the Name of a menu object in the Click event handler?
Yes... Cast the sender to MenuItem and you can access the name property.
'MenuItem' doesn't have a 'Name' property ;-).
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
On 2004-12-12, Herfried K. Wagner [MVP] <hi************ ***@gmx.at> wrote: Tom,
"Tom Shelton" <to*@YOUKNOWTHE DRILLmtogden.co m> schrieb: Can i get the Name of a menu object in the Click event handler?
Yes... Cast the sender to MenuItem and you can access the name property.
'MenuItem' doesn't have a 'Name' property ;-).
Your right... Sorry.
--
Tom Shelton [MVP]
On 2004-12-12, Rob Willaar <r.*******@xs4a ll.nl> wrote: Hi all,
Can i get the Name of a menu object in the Click event handler?
tnx for any help
Sorry, about my last answer... I answered without thinking. I can't see
anyway to get the name of the object. So, the only things I can think
todo are 1) make sure each menuitem has it's own click event - then you
know what item for sure clicked it. 2) try to make use of the menuitems
index property 3) inherit from menuitem and create your own class.
None seem ideal really...
--
Tom Shelton [MVP]
I have never done this before but i cound create a new menuitem and add a
tag property.
"Tom Shelton" <to*@YOUKNOWTHE DRILLmtogden.co m> schreef in bericht
news:u4******** ********@tk2msf tngp13.phx.gbl. .. On 2004-12-12, Rob Willaar <r.*******@xs4a ll.nl> wrote: Hi all,
Can i get the Name of a menu object in the Click event handler?
tnx for any help
Sorry, about my last answer... I answered without thinking. I can't see anyway to get the name of the object. So, the only things I can think todo are 1) make sure each menuitem has it's own click event - then you know what item for sure clicked it. 2) try to make use of the menuitems index property 3) inherit from menuitem and create your own class.
None seem ideal really...
-- Tom Shelton [MVP] This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Steven Bethard |
last post by:
In the "empty classes as c structs?" thread, we've been talking in some
detail about my proposed "generic objects" PEP. Based on a number of
suggestions, I'm thinking more and more that instead of a single
collections type, I should be proposing a new "namespaces" module
instead. Some of my reasons:
(1) Namespace is feeling less and less like a collection to me. Even
though it's still intended as a data-only structure, the use cases...
|
by: Keith Rowe |
last post by:
Hello,
I am trying to reference a Shockwave Flash Object on a vb code behind page
in an ASP.NET project and I receive the following error:
Guid should contain 32 digits with 4 dashes
(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
On the aspx page I have the object tag as follows:
|
by: Martin |
last post by:
I'd like to be able to get the name of an object instance from within
a call to a method of that same object. Is this at all possible?
The example below works by passing in the name of the object instance
(in this case 'myDog'). Of course it would be better if I could
somehow know from within write() that the name of the object instance
was 'myDog' without having to pass it as a parameter.
////////////////////////////////
function...
|
by: tshad |
last post by:
I have a function:
function SalaryDisplay(me)
{
var salaryMinLabel = document.getElementById("SalaryMin");
salaryMinLabel.value = 200;
alert("after setting salaryMinLabel = " + salaryMinLabel.value);
}
I also have an asp.net object:
|
by: Aaron |
last post by:
I have a data sructure setup and I populate it in a loop like so:
y=0
while X:
DS.name = "ASDF"
DS.ID = 1234
list = DS;
y = y + 1
| |
by: Matthew |
last post by:
I have a nice little Sub that saves data in a class "mySettings" to an XML
file.
I call it like so:
Dim mySettings As mySettings = New mySettings
mySettings.value1 = "someText"
mySettings.value2 = "otherText"
xmlSave("C:\folder\file.xml", mySettings)
Here is the sub:
Public Shared Sub xmlSave(ByVal path As String, ByVal config As
|
by: anonymous.user0 |
last post by:
The way I understand it, if I have an object Listener that has
registered as a listener for some event Event that's produced by an
object Emitter, as long as Emitter is still allocated Listener will
stay alive. Is this correct?
If this is correct, I've got a problem. Let's say I've got an object
Customer that has an PurchaseList (Collection) of Purchase objects.
Now, these Purchase objects were pulled from a datasource Datasource.
The...
|
by: yb |
last post by:
Hi,
Is there a standard for the global 'window' object in browsers? For
example, it supports methods such as setInterval and clearInterval, and
several others.
I know that w3c standardized several parts of the DOM, but this does
not include the window object.
Thank you
|
by: Andrus |
last post by:
I'm implementing entity object which should populate its properties from
database when property is first referenced.
In RDL reports I use object properties like
MyObject.MyProperty
MyObject is instance of MyEntity class. There is no MyProperty property in
MyObject at design time.
|
by: Astley Le Jasper |
last post by:
Sorry for the numpty question ...
How do you find the reference name of an object?
So if i have this
bob = modulename.objectname()
how do i find that the name is 'bob'
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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...
|
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...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |