Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

C#: Anzeigen von Icons in einer TreeView Komponente

Empfohlene Antworten

Veröffentlicht

Hallo!

Wie kann ich in einem TreeView zu den einzelne Knoten ein Icon anzeigen?

Gruß

Azrael

Originalzitat aus der MSDN:Stichwort TreeView

Setting Icons for the Windows Forms TreeView Control

The Windows Forms TreeView control can display icons next to each node. The icons are positioned to the immediate left of the node text. To display these icons, you must associate the tree view with an ImageList control. For more information about image lists, see Introduction to the Windows Forms ImageList Component and Adding or Removing Images with the Windows Forms ImageList Component.

To display images in a tree view

1. Set the TreeView control's ImageList property to the existing ImageList control you wish to use.

These properties can be set in the designer with the Properties window, or in code.

treeView1.ImageList = imageList1;

2. Set the node's ImageIndex and SelectedImageIndex properties. The ImageIndex property determines the image displayed for the node's normal and expanded states, and the SelectedImageIndex property determines the image displayed for the node's selected state. These properties can be set in code, or within the TreeNode Editor. To open the TreeNode Editor, click the ellipsis button () next to the Nodes property on the Properties window.
// (Assumes that imageList1 contains at least two images and

// the TreeView control contains a selected image.)

treeView1.SelectedNode.ImageIndex = 0;

treeView1.SelectedNode.SelectedImageIndex = 1;

1. Einfacher kann man es nicht erklären. ;)

2. RTFM :rolleyes:

Morgen!

Danke!

Habs aber doch noch selber raus bekommen! :P

Gruß

Azrael

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.