setForegroundColor('#000000'); $label->setBackgroundColor('#FFFFFF'); $label->show(); ?>
setForegroundColor('#FF0000'); $label->setBackgroundColor('#FFFFFF'); $label->show(); ?>This code creates a label widget with the text "Sample Label" using the Arial font with a font size of 12. The foreground color is set to red and the background color to white. Package library: PHP GTK.