Re: Automatically generated code by Glade.. where to put certain functions?



here is what i want to do:
i have designed two window widgets using glade and when i press the OK
button on the first one, i want the second one to be displayed.
in which file do i place the code to do this stuff?

callbacks.c is bang on target. You would have to create a "callback" function for the "on_click" event of the 
first button(either using glade IDE or otherwise). And in that callback function created you should be 
creating the second button, typically the syntax of which would be
        
        second_button = create_sec_btn() ;
where second_button is a pointer of type GtkWidget, and assuming that your second buttons' name is sec_btn, 
or use whatever name you have given.
This would surely work. should worries with it.

i guess i cannot do it
in main.c and i callback.c it does not work.
please save and build your code once you have created any callback using the glade IDE. you shouldnt have a 
problem.

-partha
_____________
parthasarathi s a
Associate Engineer - e-Security
Odyssey Techonologies Limited.

e-mail: parthasarathi at odysseytec dot com
        parthasarathi at mail dot cyberneme dot com
___________________ 
Live to Win. Dare to Lose.
___________________



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