Aide:ControlListView.txt

De Wiki AutoIt Français
Aller à : navigation, rechercher

Document original V3.3.6.1 :

###Function###
ControlListView

###Description###
Sends a command to a ListView32 control.

###Syntax###
ControlListView ( "title", "text", controlID, "command" [, option1 [, option2]] )


###Parameters###
@@ParamTable@@
title
	The title of the window to access.
text
	The text of the window to access.
controlID
	The control to interact with.  See <a href="../intro/controls.htm">Controls</a>.
command
	The command to send to the control (see below).
option1
	[optional] Additional parameter required by some commands.
option2
	[optional] Additional parameter required by some commands.
@@End@@


###ReturnValue###
Depends on command as table below shows.  In case of an error (such as an invalid command or window/control could not be found) then @error is set to 1.

<br>
@@ControlCommandTable@@
<b>Command, Option1, Option2</b>
	<b>Operation</b>
"DeSelect", From [, To]
	Deselects one or more items.
"FindItem", "string to find" [, SubItem]
	Returns the item index of the string.  Returns -1 if the string is not found.
"GetItemCount"
	Returns the number of list items.
"GetSelected" [, option]
	Returns a string containing the item index of selected items.  If option=0 (default) only the first selected item is returned.  If option=1 then all the selected items are returned delimited by |, e.g: &quot;0|3|4|10&quot;.  If no items are selected a blank "" string is returned.
"GetSelectedCount"
	Returns the number of items that are selected.
"GetSubItemCount"
	Returns the number of subitems.
"GetText", Item, SubItem
	Returns the text of a given item/subitem.
"IsSelected", Item
	Returns 1 if the item is selected, otherwise returns 0.
"Select", From [, To]
	Selects one or more items.
"SelectAll"
	Selects all items.
"SelectClear"
	Clears the selection of all items.
"SelectInvert"
	Inverts the current selection.
"ViewChange", "view"
	Changes the current view.  Valid views are "list", "details", "smallicons", "largeicons".
@@End@@
<br>
All items/subitems are 0 based.  This means that the first item/subitem in a list is 0, the second is 1, and so on.

In a "Details" view of a ListView32 control, the &quot;item&quot; can be thought of as the &quot;row&quot; and the &quot;subitem&quot; as the &quot;column&quot;.


###Remarks###
Some commands may fail when using a 32-bit AutoIt process to read from a 64-bit process.  Likewise commands may fail when using a 64-bit AutoIt process to read from a 32-bit process.

###Related###
ControlCommand


###Example###
@@IncludeExample@@


Document traduit V3.3.6.1 :

###Function###
ControlListView

###Description###
Envoi une commande à un contrôle de type ListView32.


###Syntax###
ControlListView ( "title", "text", controlID, "command" [, option1 [, option2]] )


###Parameters###
@@ParamTable@@
title
	Le titre de la fenêtre à atteindre.
text
	Le texte de la fenêtre à atteindre.
controlID
	Le contrôle avec lequel interagir. Voir <a href="../intro/controls.htm">Controls</a>.
command
	La commande à envoyer au contrôle (voir ci-dessous).
option1
	[optionnel] Paramètre additionnel requis par certaines commandes.
option2
	[optionnel] Paramètre additionnel requis par certaines commandes.
@@End@@


###ReturnValue###
Dépend de la commande tel que montré dans le tableau ci-dessous. En cas d'erreur (telle qu'une commande ou fenêtre/contrôle invalide), @error est mis à 1.

<br>
@@ControlCommandTable@@
<b>Commande, Option1, Option2</b>
	<b>Operation</b>
"DeSelect", From [, To]
	Dé-sélectionne un ou plusieurs éléments.
"FindItem", "string to find" [, SubItem]
	Retourne l'index de la chaîne recherchée. Retourne -1 si la chaîne n'est pas trouvée.
"GetItemCount"
	Retourne le nombre d'éléments de la liste.
"GetSelected" [, option]
	Retourne une chaîne contenant l'index des éléments sélectionnés. Si option=0 (défaut) seul l'index du premier élément sélectionné est retourné.  Si option=1 alors tout les index sélectionnés sont retournés séparés par le caractère "|", par exemple: &quot;0|3|4|10&quot;. Si aucun éléments n'est sélectionné, une chaine vide "" est retournée.
"GetSelectedCount"
	Retourne le nombre d'éléments qui sont sélectionnés.
"GetSubItemCount"
	Retourne le nombre de sous-éléments.
"GetText", Item, SubItem
	Retourne le texte d'un élément/sous élément donné.
"IsSelected", Item
	Retourne 1 si l'élément est sélectionné, sinon retourne 0.
"Select", From [, To]
	Sélectionne un ou plusieurs éléments.
"SelectAll"
	Sélectionne tous les éléments.
"SelectClear"
	Efface la sélection de tous les éléments.
"SelectInvert"
	Inverse la sélection en cours.
"ViewChange", "view"
	Change le type de vue en cours. Les types de vues possibles sont : "list", "details", "smallicons", "largeicons".
@@End@@
<br>
Tous les éléments et sous éléments sont indexés à partir de 0. Cela signifie que le premier élément de la liste a pour indice 0, le second a pour indice 1, et ainsi de suite.

Dans une vue "détaillée" d'un contrôle de type ListView32, un élément (&quot;item&quot;) correspond à une ligne (&quot;row&quot;) et un sous-élément (&quot;subitem&quot;) à une colonne (&quot;column&quot;).


###Remarks###
Certaines commandes peuvent échouer lors de l'utilisation d'un processus AutoIt 32-Bits pour lire un processus 64-bits. De même des commandes peuvent échouer lors de l'utilisation d'un processus AutoIt 64-Bits pour lire un processus 32-bits.


###Related###
<a href="ControlCommand.htm">ControlCommand</a>


###Example###
@@IncludeExample@@


Traducteur : ZDS

Contributeurs (pour les modifications avant le Wiki) : Tlem