Skip to content

Commit 474c32b

Browse files
added construct
1 parent c484a13 commit 474c32b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/Widget/Menubutton.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
* @package PhpGui\Widget
99
*/
1010
class Menubutton extends AbstractWidget {
11+
public function __construct(string $parentId, array $options = []) {
12+
parent::__construct($parentId, $options);
13+
$this->create();
14+
}
15+
1116
protected function create(): void {
1217
$text = $this->options['text'] ?? 'Menubutton';
1318
$this->tcl->evalTcl("menubutton .{$this->parentId}.{$this->id} -text \"{$text}\"");

0 commit comments

Comments
 (0)