Nuta
Dostęp do tej strony wymaga autoryzacji. Możesz spróbować się zalogować lub zmienić katalog.
Dostęp do tej strony wymaga autoryzacji. Możesz spróbować zmienić katalogi.
Możesz ustawić ciąg ToolTip w kodzie lub w narzędziu Windows Forms Designer w programie Visual Studio. Aby uzyskać więcej informacji na temat składnika ToolTip, zobacz ToolTip Component Overview.
Ustawianie ToolTip za pomocą programowania
Dodaj kontrolkę, która będzie wyświetlać etykietkę narzędzia.
Użyj metody SetToolTip składnika ToolTip.
' In this example, Button1 is the control to display the ToolTip. ToolTip1.SetToolTip(Button1, "Save changes")// In this example, button1 is the control to display the ToolTip. toolTip1.SetToolTip(button1, "Save changes");// In this example, button1 is the control to display the ToolTip. toolTip1->SetToolTip(button1, "Save changes");
Ustawianie etykietki narzędzia w projektancie
W programie Visual Studio dodaj składnik ToolTip do formularza.
Wybierz kontrolkę, która wyświetli etykietkę narzędzia lub dodaj ją do formularza.
W oknie właściwości ustaw wartość ToolTip on ToolTip1 na odpowiedni ciąg tekstu.
Aby programowo usunąć etykietkę narzędzia
Użyj metody SetToolTip składnika ToolTip.
' In this example, Button1 is the control displaying the ToolTip. ToolTip1.SetToolTip(Button1, Nothing)// In this example, button1 is the control displaying the ToolTip. toolTip1.SetToolTip(button1, null);// In this example, button1 is the control displaying the ToolTip. toolTip1->SetToolTip(button1, NULL);
Usuwanie etykietki narzędzia w projektancie
W programie Visual Studio wybierz kontrolkę, która wyświetla podpowiedź narzędzia.
W oknie właściwości usuń tekst w ToolTip on ToolTip1.
Zobacz także
.NET Desktop feedback