darekm wrote:
> Hi
> I've try to set property of render of combobox (GTK2)
>
> I need set it to 0.0 (default is 0.5)
> but i can't
>
> I've try yet:
> g_object_set (renderer, 'yalign',[ 0.9]);
> gtk_cell_layout_set_attributes(PGtkCellLayout(AWidget), renderer,
> ['text', 0,'yalign',0.0,nil]);
> gtk_cell_layout_add_attribute( PGtkCellLayout(AWidget), renderer,
> 'yalign', 2);
>
> but every time gtk complain
>
What you have there looks right. How do you retrieve "AWidget"?
if you are casting AWidget := PGtkWidget(ComboBox1.Handle) then that is
incorrect because the GtkComboBox is inside a GtkEventBox.
You can get the GtkComboBox a couple of ways:
use GtkProc in your program and do
AWidget := GetMainWidget(Pointer(ComboBox1.Handle));
or include Gtk2
AWidget := GTK_BIN(ComboBox1.Handle)^.child;
Regards,
Andrew Haines
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives