Package: gtk

Function gtk:widget-new

Lambda List

gtk:widget-new (gtype &rest args)

Arguments

gtype -- a g:type-t type ID of the widget to create
args -- pairs of the property keyword and value

Return Value

The new gtk:widget object of gtype type.

Details

This is a function for creating a widget and setting its properties in one go. This function is equivalent to the g:object-new function.

Examples

Create a left-aligned label.
(gtk:widget-new "GtkLabel" :label "Hello World" :xalign 0.0)
=> #<GTK:LABEL {1003142FD3}>    
 

See also

#2023-3-8