GtkEntry question
- From: <chanoman chile com>
- To: <gtk-app-devel-list gnome org>
- Subject: GtkEntry question
- Date: Fri, 26 Sep 2003 17:48:17 -0400 (CLT)
Hello. My name is Lisandro. I from Chile.
I have a question. (My level of english is not good)
I'm doing a program with GTK+ 1.2.8 ( I Have to use this version).
It contains 3 widgets GtkCombo (with numeric values) and 2 draw area where
a signal acquired from a DAQ.
The problem is:
The first time that I select a value of a widget it send garbage
(i.e. : pí5 pí5@ instead of the selected value in the widget),
if I switch to other value in the same widget, then I get the right value
of widget. Now if select other value in the widget,
it send garbage again, ( pí5 pí5) ...... Then :
1th time.- pí5 pí5 2nd time.- value OK.
3rd time.- pí5 pí5 4th time.- value OK ..........
The program that I'm writting is like the following one:
.......................Begin......................
// Function to occupy when select a value of widget
void funcionX (GtkWidget *widget, gchar *valordwidget)
{
g_print ("\n El canal Digital seleccionado es : %s ", valorwidget );
}
// ............here a part of main
............................................
GtkWidget widget; //Widget GtkCombo
GtkEntry *valor;
gchar *valorwidget;
GList * elementoswidget; // Values that are established in widget GtkCombo
//...............................................................................
//............here get the value send it to function "funcionX"........
widget = gtk_combo_new ( );
valor = GTK_ENTRY (GTK_COMBO (widget)->entry); //(xxx)
valorwidget = gtk_entry_get_text (valor);
gtk_signal_connect (GTK_OBJECT (GTK_COMBO (widget)->entry),"changed",
GTK_SIGNAL_FUNC (funcionX),valorwidget);
// the last 3 lines do:
// if a change ocurr in the value of widget then call the function
"funcionX" and
// send the value choosed of widget
........................................ End ............................
Any hint? solution?
May i use Gtkeditable? How use it in this case?
-----------------------------------------
Conéctate con Chile.com.
http://www.chile.com/accesogratis/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]