Re: how to i  [or DO i] use LEFT-JUSTY here?
- From: Gary Kline <kline thought org>
- To: Jordan <jordannh sent com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: how to i  [or DO i] use LEFT-JUSTY here?
- Date: Wed, 13 Aug 2014 22:42:36 -0700
=====
Organization: Thought Unlimited.  Public service Unix since 1986.
Of_Interest: With 28 years  of service  to the  Unix  community.
On Wed, Aug 13, 2014 at 09:23:48PM -0700, Jordan wrote:
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 :-)
        hi jordan,
        damn, I wrote around 15 lines; it got lost...  Anyway, I'm 
        inclosing a screenshot to demo that the 40 lines does do what I
        want.  the gotcha is that I'm pretty sure that the newest GTK
        --3.0--was to NOT use how I had "leftJ.c" coded.  it works the
        way I want, tho.  I do not know what you mean by "padding";
        it is or may be a fine point, but in time this stuff may give 
        me troubles.   ---if you had the GTK 3  libraries installed
        I do have the gcc compile and link line.
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.
        can you point me to some example code?  my "leftJ.c" was my
        example [!]
        ciao!
        gary
        Included: a *png file.
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
-- 
 Gary Kline  kline thought org  http://www.thought.org  Public Service Unix
             Twenty-eight years of service to the Unix community.
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]