-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GtkNotebook signals #95
Comments
what is the problem with this signals? can you provide a minimal working code of problem? |
Just this construction not reacts (ignores events) when I replacing it with signals above. So using current one. Thought maybe PHP-GTK issue, if not - please close this issue. |
Sorry, I have updated repository yesterday, the line have been switched to Just meant this construction there $this->tabs->connect(
'switch-page', // select-page, focus-tab - no reaction
function ($tabs, $child, $position)
... |
This works fine <?php
Gtk::init();
$window = new GtkWindow();
$window->set_size_request(500, 500);
$window->set_title("PHP-GTK");
// create the notebook
$notebook = new GtkNotebook();
$window->add($notebook);
$notebook->set_scrollable(true);
// add page
$notebook->append_page(GtkButton::new_with_label("Container 1"), new GtkLabel("Page 1"));
$notebook->append_page(GtkButton::new_with_label("Container 2"), new GtkLabel("Page 2"));
$notebook->append_page(GtkButton::new_with_label("Container 3"), new GtkLabel("Page 3"));
$notebook->connect("switch-page", function($notebook, $page, $num){
var_dump("Page " . $num);
});
// connect to signal that close program
$window->connect("destroy", function() {
Gtk::main_quit();
});
// show all and start
$window->show_all();
Gtk::main(); |
|
There is no descriptions available like
|
Could somebody check following signals:
select-page
focus-tab
Because I can interact with
switch-page
only, other not tested yethttps://docs.gtk.org/gtk3/class.Notebook.html
The text was updated successfully, but these errors were encountered: