Re: how to i [or DO i] use LEFT-JUSTY here?
- From: Jordan <jordannh sent com>
- To: gtk-app-devel-list gnome org
- Subject: Re: how to i [or DO i] use LEFT-JUSTY here?
- Date: Wed, 13 Aug 2014 21:23:48 -0700
Hi, Gary.
Maybe I'm not clear on what you want to accomplish. Are you wanting to have a
numbered list with padding? Screenshots/diagrams/mockups are definitely
welcome! :-D
How you're doing it seems fine to me. As long as it gets the job done you're
doing it right :-)
Other alternatives:
gtk_label_set_justify:
(https://developer.gnome.org/gtk3/unstable/GtkLabel.html#gtk-label-set-justify). You can use this in addition
to setting the widget padding.
On Wednesday, August 13, 2014 06:12:32 PM Gary Kline wrote:
=====
Organization: Thought Unlimited. Public service Unix since 1986.
Of_Interest: With 28 years of service to the Unix community.
people, is this correct for GTK+ 3.0 or how should I use
a justify-Left function in the 40-some lines below?
tthanks much!
/***** Cut Here *****/
#include <stdio.h>
#include <gtk/gtk.h>
/***
gcc -Wall -g leftJ.c -o leftJ `pkg-config --cflags gtk+-3.0` `pkg-config
--libs gtk+-3.0`
***/
int main(int argc, char *argv[])
{
GtkWidget *window, *vbox; // Labels go in here, vertically orientated.
GtkWidget *label1, *label2, *label3;
gtk_init(&argc, &argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
gtk_window_set_default_size (GTK_WINDOW (window), 700, 900);
gtk_window_set_title(GTK_WINDOW(window), "Labels Left-Margins");
gtk_container_set_border_width(GTK_CONTAINER(window), 10);
g_signal_connect(window, "destroy", G_CALLBACK(gtk_main_quit), NULL);
label1 = gtk_label_new("1: This is the file name named talk.1.txt");
gtk_misc_set_alignment(GTK_MISC(label1), 0, 0.5); // left
label2 = gtk_label_new("2: This is talk.2.txt");
gtk_misc_set_alignment(GTK_MISC(label2), 0, 0.5); // left
label3 = gtk_label_new("3: File talk.3.txt for third trial.");
gtk_misc_set_alignment(GTK_MISC(label3), 0, 0.5); // left
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5); // GTK3
gtk_container_add(GTK_CONTAINER(window), vbox);
gtk_box_pack_start(GTK_BOX(vbox), label1, FALSE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(vbox), label2, FALSE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(vbox), label3, FALSE, TRUE, 0);
gtk_widget_show_all (window);
gtk_main();
return 0;
}
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]