Olvasás angol nyelven Szerkesztés

Megosztás a következőn keresztül:


HtmlWindowCollection.Item[] Property

Definition

Retrieves an item either by its name property or its position in the collection.

Overloads

Item[Int32]

Retrieves a frame window by supplying the frame's position in the collection.

Item[String]

Retrieves a frame window by supplying the frame's name.

Remarks

Item[] enables access to the elements of the collection using array syntax.

Item[Int32]

Source:
HtmlWindowCollection.cs
Source:
HtmlWindowCollection.cs
Source:
HtmlWindowCollection.cs

Retrieves a frame window by supplying the frame's position in the collection.

public System.Windows.Forms.HtmlWindow this[int index] { get; }
public System.Windows.Forms.HtmlWindow? this[int index] { get; }

Parameters

index
Int32

The position of the HtmlWindow within the collection.

Property Value

The HtmlWindow corresponding to the requested frame.

Exceptions

index is greater than the number of items in the collection.

Remarks

HtmlWindowCollection is a zero-based collection. If there are N elements in the collection, valid arguments to Item[] are the integers from 0 to N-1.

Windows are not laid out in HtmlWindowCollection in any predetermined order.

See also

Applies to

.NET Framework 4.8.1 és más verziók
Termék Verziók
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

Item[String]

Source:
HtmlWindowCollection.cs
Source:
HtmlWindowCollection.cs
Source:
HtmlWindowCollection.cs

Retrieves a frame window by supplying the frame's name.

public System.Windows.Forms.HtmlWindow this[string windowId] { get; }
public System.Windows.Forms.HtmlWindow? this[string windowId] { get; }

Parameters

windowId
String

The name of the HtmlWindow to retrieve.

Property Value

The HtmlWindow element corresponding to the supplied name.

Exceptions

windowId is not the name of a Frame object in the current document or in any of its children.

Remarks

Item[] will return a single element whose Name property corresponds to elementId. If the document contains multiple elements with the same name, Item[] will return only the first one in the collection. If you need to retrieve all elements with a Name property of windowId, use the GetElementsByName method instead.

See also

Applies to

.NET Framework 4.8.1 és más verziók
Termék Verziók
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9