TableLayoutPanel.GetPositionFromControl(Control) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient la TableLayoutPanelCellPosition ligne et la colonne de la cellule qui contient le contrôle.
public:
System::Windows::Forms::TableLayoutPanelCellPosition GetPositionFromControl(System::Windows::Forms::Control ^ control);
public System.Windows.Forms.TableLayoutPanelCellPosition GetPositionFromControl(System.Windows.Forms.Control control);
public System.Windows.Forms.TableLayoutPanelCellPosition GetPositionFromControl(System.Windows.Forms.Control? control);
member this.GetPositionFromControl : System.Windows.Forms.Control -> System.Windows.Forms.TableLayoutPanelCellPosition
Public Function GetPositionFromControl (control As Control) As TableLayoutPanelCellPosition
Paramètres
- control
- Control
Contrôle contenu dans une cellule.
Retours
Qui TableLayoutPanelCellPosition représente la position de la cellule.
Remarques
La GetPositionFromControl méthode retourne la position actuelle réelle de control, même si sa position est déterminée par le LayoutEngine. Cette méthode prend en compte l’état de contrôle entier TableLayoutPanel , y compris la colonne ou la ligne couvrant et lorsque le LayoutEngine contrôle a placé un contrôle avec ses Column propriétés définies Row sur -1. Cela équivaut à la situation dans laquelle GetColumn et GetRow retournent -1.