| | |
GTK+ help needed: How do I add a GtkEntry so that it fills a GtkToolbar?
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
![]() |
This is a just simplified case because my C file is too big to post it here:
How do I add locationentry to the toolbar so that it fills the toolbar? GtkToolItem does not subclass GtkBox so I can't use gtk_box_pack_start function which has the fill argument I need here.
I attached the big C file.
I forgot to say that I'm using Webkit GTK+ port (libwebkit-dev package on Ubuntu 9.10). The simplified case does not use this lib, but the main.c file I attached uses it.
PS: Sorry for my bad English..
C Syntax (Toggle Plain Text)
int main(int argc, char **argv) { GtkWidget *window, *vbox, *toolbar, *locationentry; GtkToolItem *locationbar; gtk_init(&argc, &argv); window = gtk_window_new(GTK_WINDOW_TOPLEVEL); vbox = gtk_vbox_new(FALSE, 0); toolbar = gtk_toolbar_new(); locationentry = gtk_entry_new(); locationbar = gtk_tool_item_new(); gtk_container_add(GTK_CONTAINER(locationbar), locationentry); gtk_toolbar_insert(GTK_TOOLBAR(toolbar), locationbar, -1); gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 0); gtk_container_add(GTK_CONTAINER(window), vbox); gtk_widget_show_all(window); gtk_main(); return 0; }
How do I add locationentry to the toolbar so that it fills the toolbar? GtkToolItem does not subclass GtkBox so I can't use gtk_box_pack_start function which has the fill argument I need here.
I attached the big C file.
I forgot to say that I'm using Webkit GTK+ port (libwebkit-dev package on Ubuntu 9.10). The simplified case does not use this lib, but the main.c file I attached uses it.
PS: Sorry for my bad English..
Last edited by silviubogan; Aug 16th, 2009 at 11:11 am. Reason: To specify the WebkitGTK+ lib I use.
--Silviu Bogan
![]() |
Similar Threads
- Help needed with UPDATE Trigger (MS SQL)
- Code needed to add button from one site to mine. (Java)
- How To Add a Search Bar? (HTML and CSS)
- Help with Inventory part 6 program please!! (Java)
- Please help Errors will not compile (Java)
- Help needed with Math problem (C++)
- Add hardware or invest in a new computer? (Motherboards, CPUs and RAM)
- How to add a 3rd Hard Drive (Storage)
Other Threads in the C Forum
- Previous Thread: Floating point not linked error
- Next Thread: Hardware interactions on Linux
| Thread Tools | Search this Thread |
Tag cloud for C
adobe ansi api array arrays asterisks binarysearch calculate centimeter char convert copyanyfile copyimagefile copypdffile cprogramme createcopyoffile csyntax directory drawing dynamic executable fflush file fork frequency getlasterror givemetehcodez graphics gtkgcurlcompiling hacking hardware highest homework i/o inches incrementoperators infiniteloop initialization interest km lazy linked linkedlist linux linuxsegmentationfault list locate logical_drives match matrix microsoft motherboard multi mysql number open opendocumentformat opensource owf pattern pdf performance pointer pointers posix power problem probleminc program programming pyramidusingturboccodes read recursion recv repetition scanf scheduling scripting segmentationfault send shape socketprograming spoonfeeding stack standard string strings structures student suggestions systemcall test testautomation unix user variable voidmain() wab win32api windows.h





