01 May 2013 - After the site upgrade, all passwords were reset and you will need to ask the site for a login reset on your first connection.

GtkToolButtons

How do I remove all the current buttons from a Toolbar?

I have solved the problem

I have solved the problem.

First you get the total buttons by using $toolbar->get_n_items();
Then in a for loop, go through all the buttons on the toolbar and remove them but from the back.

Sample code:

<?php
if ($oldItems != 0)
  {
  for (
$i = $oldItems; $i >= 0; $i--)
    {
    if (
is_object($menuItemBar->get_nth_item($i)))
      {
     
$menuItemBar->remove($menuItemBar->get_nth_item($i));
      }
    }
  }
?>

Hope this helps someone that also struggles with something like this.

H

Darstellungsoptionen

Wählen Sie hier Ihre bevorzugte Anzeigeart für Kommentare und klicken Sie auf „Einstellungen speichern“ um die Änderungen zu übernehmen.