Assembly : System.Windows.Forms (dans system.windows.forms.dll)
Syntaxe<ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _ <ComVisibleAttribute(True)> _ Public Class HScrollBar Inherits ScrollBar
Dim instance As HScrollBar
[ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)] [ComVisibleAttribute(true)] public class HScrollBar : ScrollBar
[ClassInterfaceAttribute(ClassInterfaceType::AutoDispatch)] [ComVisibleAttribute(true)] public ref class HScrollBar : public ScrollBar
/** @attribute ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch) */ /** @attribute ComVisibleAttribute(true) */ public class HScrollBar extends ScrollBar
ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch) ComVisibleAttribute(true) public class HScrollBar extends ScrollBar
NotesLa majorité des contrôles qui nécessitent des barres de défilement les fournissent d'emblée et ne requièrent donc pas ce contrôle. Tel est le cas notamment avec un contrôle TextBox multiligne, un contrôle ListBox et un contrôle ComboBox.
Vous pouvez utiliser ce contrôle pour procéder à l'implémentation du défilement dans des conteneurs ne possédant pas leurs propres barres de défilement (contrôle PictureBox ou entrée d'utilisateur de données numériques, par exemple). Les données numériques peuvent être affichées dans un contrôle ou utilisées dans le code. Les propriétés Minimum et Maximum déterminent la plage de valeurs pouvant être sélectionnées par l'utilisateur. La propriété LargeChange détermine l'effet d'un clic sur la barre de défilement, en dehors de la case de défilement. La propriété SmallChange détermine l'effet d'un clic sur les flèches de défilement, à chaque extrémité du contrôle.
ExempleL'exemple suivant crée et initialise un HScrollBar et l'ajoute à un Form.
Private Sub InitializeMyScrollBar() ' Create and initialize an HScrollBar. Dim hScrollBar1 As New HScrollBar() ' Dock the scroll bar to the bottom of the form. hScrollBar1.Dock = DockStyle.Bottom ' Add the scroll bar to the form. Controls.Add(hScrollBar1) End Sub 'InitializeMyScrollBar
private void InitializeMyScrollBar() { // Create and initialize an HScrollBar. HScrollBar hScrollBar1 = new HScrollBar(); // Dock the scroll bar to the bottom of the form. hScrollBar1.Dock = DockStyle.Bottom; // Add the scroll bar to the form. Controls.Add(hScrollBar1); }
private: void InitializeMyScrollBar() { // Create and initialize an HScrollBar. HScrollBar^ hScrollBar1 = gcnew HScrollBar; // Dock the scroll bar to the bottom of the form. hScrollBar1->Dock = DockStyle::Bottom; // Add the scroll bar to the form. Controls->Add( hScrollBar1 ); }
private void InitializeMyScrollBar() { // Create and initialize an HScrollBar. HScrollBar hScrollBar1 = new HScrollBar(); // Dock the scroll bar to the bottom of the form. hScrollBar1.set_Dock(DockStyle.Bottom); // Add the scroll bar to the form. get_Controls().Add(hScrollBar1); } //InitializeMyScrollBar
function InitializeMyScrollBar(){ // Create and initialize an HScrollBar. var hScrollBar1 : HScrollBar = new HScrollBar() // Dock the scroll bar to the bottom of the form. hScrollBar1.Dock = DockStyle.Bottom // Add the scroll bar to the form. Controls.Add(hScrollBar1) }
Hiérarchie d'héritageSystem.MarshalByRefObject
System.ComponentModel.Component
System.Windows.Forms.Control
System.Windows.Forms.ScrollBar
System.Windows.Forms.HScrollBar
Sécurité des threads
Plates-formesWindows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile pour Pocket PC, Windows Mobile pour Smartphone, Windows Server 2003, Windows XP Édition Media Center, Windows XP Professionnel Édition x64, Windows XP SP2, Windows XP Starter Edition
Le .NET Framework ne prend pas en charge toutes les versions de chaque plate-forme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise.
Informations de version
Outils (masquer)
S'enregistrer
Liste des Membres
Qui est en ligne?
FAQ