Re: display values



Lucius Gamarc wrote:
> i have coded a program that retrieves values from a port and i want to 
> display the values in a non-editable entry box.
> i have successful built a gui but am unable to display the inputted 
> value as it is returned as the pointer, &data and when i try to add this 
> to the gtk_entry_set_text(GTK_ENTRY(entry),&data);
> it is not displayed?

Hi Lucius, you need to convert you data to a string and display that. 
Something like:

   char buf[ 256 ];

   snprintf( buf, 256, "value is %d", data );
   gtk_entry_set_text( GTK_ENTRY( widget ), buf );

if your data is an integer.

John



========================================================== 
Aelbert Cuyp 13 February - 12 May 2002 

For information and tickets: 
http://www.nationalgallery.org.uk/exhibitions/cuyp/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]