Re: question for packing
- From: Olexiy Avramchenko <olexiy irtech cn ua>
- To: Tom Liu <tom liu flextrade com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: question for packing
- Date: Sat, 25 Oct 2003 12:38:21 +0300
Tom Liu wrote:
Hi,
When I using GtkHBox to packing, I set the homogeneous to true,
I want to pack a label and an entry. Label should be right aligment,
entry should be left aligment, how can I do this?
------------------------------------------------
| ------------ -------------- |
| |the label | | the entry | |
| ------------ -------------- |
------------------------------------------------
^
center
I know this should be easy, but I can't do this.
This is my code:
m_w=gtk_hbox_new(TRUE,3);
w_lab=gtk_label_new(label_string);
gtk_box_pack_start(GTK_BOX(m_w),w_lab,FALSE,TRUE,0);
gtk_label_set_justify(GTK_LABEL(w_lab),GTK_JUSTIFY_RIGHT);
w_edit=gtk_entry_new ();
gtk_box_pack_start(GTK_BOX(m_w),w_edit,TRUE,TRUE,0);
the justify doesn't work at all!.
Use:
gtk_misc_set_alignment(GTK_MISC(w_lab), 0.0, 0.5);
Olexiy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]