ui.Label.setUrl
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Ustawia adres URL etykiety, co spowoduje, że będzie ona renderowana jako link.
Zwraca tę etykietę.
Wykorzystanie | Zwroty |
---|
Label.setUrl(targetUrl) | ui.Label |
Argument | Typ | Szczegóły |
---|
to: ui.label | ui.Label | Instancja ui.Label. |
targetUrl | Ciąg znaków | Adres URL hiperlinku. |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-26 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-26 UTC."],[[["\u003cp\u003e\u003ccode\u003eLabel.setUrl()\u003c/code\u003e configures a label to act as a hyperlink by setting its URL.\u003c/p\u003e\n"],["\u003cp\u003eIt takes the target URL as an argument and applies it to the specified ui.Label instance.\u003c/p\u003e\n"],["\u003cp\u003eCalling \u003ccode\u003esetUrl()\u003c/code\u003e also returns the ui.Label object, allowing for method chaining.\u003c/p\u003e\n"]]],[],null,["# ui.Label.setUrl\n\n\u003cbr /\u003e\n\nSets the url of the label, which will cause it to render as a link.\n\n\u003cbr /\u003e\n\nReturns this label.\n\n| Usage | Returns |\n|---------------------------|----------|\n| Label.setUrl`(targetUrl)` | ui.Label |\n\n| Argument | Type | Details |\n|------------------|----------|---------------------------|\n| this: `ui.label` | ui.Label | The ui.Label instance. |\n| `targetUrl` | String | The url of the hyperlink. |"]]