Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    [C/Gtk] Input e Output ???

    Ho Creato due Oggetti...
    Uno per l'inserimento di testi e l'altro per la visualizzazione..

    codice:
    ...
    insert = gtk_entry_new ();
    ...
    output = gtk_text_view_new ();
    ...
    Come faccio a prendere la stringa che inserisce l'utente nell'oggetto insert e stamparla nell'oggetto output ???
    PoWered by:
    Gentoo 1.5.3 - Kernel 2.6.7
    Debian Sid - Kernel 2.6.7 - Bash 3.0
    Slackware current - Kernel 2.6.7

  2. #2
    Se input e' una gtkentry e output una stringa, allora:
    output = gtk_entry_get_text(input)

    Ti consiglio di dare un'occhiata negli headers

  3. #3
    Non Ho capito...

    Io Ho il Primo Form che e' un Input...
    codice:
    address = gtk_entry_new ();
    gtk_widget_set_name (address, "address");
    gtk_widget_show (address);
    gtk_box_pack_start (GTK_BOX (vbox1), address, FALSE, FALSE, 0);
    quando premo invio deve leggermi il testo inserito e uso:
    codice:
    gtk_signal_connect(GTK_OBJECT(address), "activate", GTK_SIGNAL_FUNC(address_enter), address);
    La funzione address_enter e' questa...
    e stampa a video quello che c'e' nel form...
    Ma dovrebbe stamparla nel Widget status (e non so come si fa')
    codice:
    void address_enter(GtkWidget *widget, GtkWidget *entry) {
      gchar *url;
      url = gtk_entry_get_text(GTK_ENTRY(entry));
      g_print ("Url = %s\n", url);
    }
    codice:
    status = gtk_text_view_new ();
    gtk_widget_set_name (status, "status");
    gtk_widget_show (status);

    Io Ho un 'form' di input e un 'form' di output...
    Come faccio a mettere il testo che viene inserito nel form di input
    in quello di output ???
    PoWered by:
    Gentoo 1.5.3 - Kernel 2.6.7
    Debian Sid - Kernel 2.6.7 - Bash 3.0
    Slackware current - Kernel 2.6.7

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.