Skip to content

Latest commit

 

History

History
19 lines (16 loc) · 427 Bytes

Button.md

File metadata and controls

19 lines (16 loc) · 427 Bytes

Button Widget

The Button widget triggers actions when clicked.

Example

use PhpGui\Widget\Button;
$button = new Button('parentId', [
    'text' => 'Submit',
    'command' => function() {
        echo "Button clicked!";
    }
]);

Details

  • Can be customized with additional options (e.g., bg, fg, font).
  • Registers a PHP callback to handle click events.
  • Essential for interactive actions in a GUI.