WCM - Das österreichische Computer Magazin Forenübersicht
 

Zurück   WCM Forum > Rat & Tat > Programmierung

Programmierung Rat & Tat für Programmierer

Microsoft KARRIERECAMPUS

 
 
Themen-Optionen Ansicht
Alt 18.01.2001, 11:40   #4
Jaguar
Classic Car Driver
 
Benutzerbild von Jaguar
 
Registriert seit: 16.02.2000
Ort: Wien
Beiträge: 569

Mein Computer

Beitrag

mit der SelectedItem Property kannst ermitteln welcher Node grad aktiviert/selektiert wurde beim klicken (siehe unten das Beispiel aus der MSDN-Lib)

SelectedItem Property (ActiveX Controls)

Returns a reference to a selected ListItem, Node, or Tab object.

Syntax
object.SelectedItem

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Remarks

The SelectedItem property returns a reference to an object that can be used to set properties and invoke methods on the selected object. This property is typically used to return a reference to a ListItem, Node, or Tab or object that the user has clicked or selected. With this reference, you can validate an object before allowing any further action, as demonstrated in the following code:

Command1_Click()
' If the selected object is not the root, then remove the Node.
If TreeView1.SelectedItem.Index <> 1 Then
Treeview1.Nodes.Remove TreeView1.SelectedItem.Index
End If
End Sub

To programmatically select a ListItem object, use the Set statement with the SelectedItem property, as follows:

Set ListView1.SelectedItem = ListView1.ListItems(1)

Jaguar ist offline   Mit Zitat antworten
 


Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
 

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.

Gehe zu


Alle Zeitangaben in WEZ +2. Es ist jetzt 06:48 Uhr.


Powered by vBulletin® Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Forum SEO by Zoints
© 2009 FSL Verlag