Buttons are declared in xml file like :
<button name=""
string="Approve"
type="object"
icon="gtk-apply" />
it has 'name' attribute where you declare the name of the function which you want to call as you described in the python file.
The 'string' attribute use to declare the name of the button which you want to show.
The 'type' attribute has two (mainly used) values 'object' and 'action'.
The 'icon' attribute use to show different button icon labels.
Here is another example that contains 'special' attribute and no 'name' attribute
When the cancel button is pressed it will automatically close the window without saving.
<button string="Cancel"
special="cancel"
type="object"
icon="gtk-cancel"/>
In addition there are also other attributes like 'confirm' 'states' e.t.c
<button name=""
string="Approve"
type="object"
icon="gtk-apply" />
it has 'name' attribute where you declare the name of the function which you want to call as you described in the python file.
The 'string' attribute use to declare the name of the button which you want to show.
The 'type' attribute has two (mainly used) values 'object' and 'action'.
The 'icon' attribute use to show different button icon labels.
Here is another example that contains 'special' attribute and no 'name' attribute
When the cancel button is pressed it will automatically close the window without saving.
<button string="Cancel"
special="cancel"
type="object"
icon="gtk-cancel"/>
In addition there are also other attributes like 'confirm' 'states' e.t.c
No comments:
Post a Comment