LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-23-2004, 02:09 AM   #1
jrafalek
LQ Newbie
 
Registered: Dec 2004
Posts: 20

Rep: Reputation: 0
how to get widget


Hi
I try to write my first program in GTK+ and I have problem with callbacks.
I generated GUI (one label "label1" and one button "guzik") with Glade and in callbacks.c try to write my own code.
When I type:

void
on_guzik_naciskany_leave (GtkButton *button,
gpointer user_data)
{
label12 = lookup_widget(GTK_WIDGET(button), "label1");
gtk_label_set_text(GTK_LABEL(label12),"buu");

}

I change button text but I want to change text on label (text area).
Is somebody know how to do it?
Thanks
 
Old 03-06-2006, 08:33 PM   #2
santhosh.linux
Member
 
Registered: Nov 2005
Location: India
Posts: 42

Rep: Reputation: 15
Label change

Hai,
instead of giving button in lookup_widget...give your window name like this

temp_label=lookup_widget(GTK_WIDGET(window1),"label1");



ok
bye santhosh
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
qt widget problem linetnew Programming 1 10-20-2005 01:49 AM
Help regarding Entry widget kshebbar0802 Programming 3 08-25-2005 04:39 PM
The name of this widget NightKids Linux - Newbie 2 06-06-2005 10:57 AM
Which GTK Widget to use? jpbarto Programming 0 11-20-2003 07:34 PM
what is a gtk-widget ? gladeiator Programming 3 10-30-2003 05:34 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration