Dear All
Thanks to you Donny, Vivien and Yann for your replies.
The point problem was solved immediately the way Yann had described. I
wanted a different way, in which I could draw points of desired width, but
this works.
For the second problem, namely, numbers only, here is the code:
static void ip_callback1(GtkWidget *widget, GtkWidget *entry)
{
const gchar *entry_text;
entry_text = gtk_entry_get_text(GTK_ENTRY(entry));
if(entry != NULL)
{
gchar one = *((gchar *)(entry_text + strlen(entry_text) -
1));
if(one < '0' || one > '9')
gtk_entry_set_text(GTK_ENTRY(entry), "\0");
}
g_print("ip-callback = %s\n", entry_text);
}
On Jan 15, 2008 2:36 PM, Donny Viszneki < [EMAIL PROTECTED]> wrote:
> On Jan 15, 2008 3:16 AM, Vivien Malerba <[EMAIL PROTECTED]> wrote:
> > 2008/1/15 kartikay malhotra <[EMAIL PROTECTED] >:
> > > I am making an IP address bar in GTK. It would function as 123 . 445 .
> 521 .
> > You might have a look at http://gnomefiles.org/app.php/GtkMaskedEntry.
>
> This too http://view.sourceforge.net/classes.php#ipentry
>
> --
> http://www.socsurveys.org/
> http://blogger.socsurveys.org/
> http://del.icio.us/hdon
>
--
> Best Regards
> Er. Kartikay Malhotra
>
>
>
> "Sure I am this day we are masters of our fate, that the task which has
> been set before us is not above our strength; that its pangs and toils are
> not beyond our endurance. As long as we have faith in our own cause and an
> unconquerable will to win, victory will not be denied us." --Winston
> Churchill
--
Best Regards
Er. Kartikay Malhotra
"Sure I am this day we are masters of our fate, that the task which has been
set before us is not above our strength; that its pangs and toils are not
beyond our endurance. As long as we have faith in our own cause and an
unconquerable will to win, victory will not be denied us." --Winston
Churchill
_______________________________________________
gtk-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtk-list