diff --git a/src/Abstract/Entity/Entry.php b/src/Abstract/Entity/Entry.php index 6ccdc4c1..67af574c 100644 --- a/src/Abstract/Entity/Entry.php +++ b/src/Abstract/Entity/Entry.php @@ -66,6 +66,28 @@ abstract class Entry \GdkEvent $event ): void; + public function setLength( + ?int $value = null + ): void + { + $this->gtk->set_max_length( + is_null($value) ? $this->_length : $value + ); + } + + public function setPlaceholder( + ?string $value = null + ): void + { + $this->gtk->set_placeholder_text( + is_null($value) ? $this->_value : trim( + strval( + $value + ) + ) + ); + } + public function setValue( ?string $value = null ): void @@ -79,6 +101,16 @@ abstract class Entry ); } + public function getLength(): ?int + { + return $this->gtk->get_max_length(); + } + + public function getPlaceholder(): ?string + { + return $this->gtk->get_placeholder_text(); + } + public function getValue(): ?string { return $this->gtk->get_text();