mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
add placeholder text
This commit is contained in:
parent
31a3aaf216
commit
0bb3cf2415
1 changed files with 7 additions and 2 deletions
|
|
@ -9,12 +9,17 @@ class Address
|
||||||
public \GtkEntry $entry;
|
public \GtkEntry $entry;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
?string $value = null
|
?string $text = null,
|
||||||
|
?string $placeholder = 'URL or any search term...'
|
||||||
) {
|
) {
|
||||||
$this->entry = new \GtkEntry();
|
$this->entry = new \GtkEntry();
|
||||||
|
|
||||||
$this->entry->set_text(
|
$this->entry->set_text(
|
||||||
$value
|
$text
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->entry->set_placeholder_text(
|
||||||
|
$placeholder
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->entry->set_max_length(
|
$this->entry->set_max_length(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue