{"id":818,"date":"2010-04-08T17:15:43","date_gmt":"2010-04-09T00:15:43","guid":{"rendered":"http:\/\/wp.colliertech.org\/cj\/?p=818"},"modified":"2010-04-09T17:47:50","modified_gmt":"2010-04-10T00:47:50","slug":"getting-started-with-gtk%e2%99%af","status":"publish","type":"post","link":"https:\/\/wp.c9h.org\/cj\/?p=818","title":{"rendered":"Getting started with gtk\u00e2\u2122\u00af"},"content":{"rendered":"<p>This is a quick tutorial for getting a first gtk-sharp app up and going.<\/p>\n<h3>Install MonoDevelop<\/h3>\n<pre><b>$<\/b> sudo apt-get install monodevelop libgtk2.0-cil-dev<\/pre>\n<h3>Start MonoDevelop<\/h3>\n<p>It&#8217;ll be in your GNOME application menu under Applications->Programming->MonoDevelop<\/p>\n<h3>Create a new Gtk# Project<\/h3>\n<figure id=\"attachment_819\" aria-describedby=\"caption-attachment-819\" style=\"width: 683px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/00_gtk-sharp_new_project.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/00_gtk-sharp_new_project.png?resize=683%2C557\" alt=\"Create New Project\" title=\"00_gtk-sharp_new_project\" width=\"683\" height=\"557\" class=\"size-full wp-image-819\" srcset=\"https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/00_gtk-sharp_new_project.png?w=683&amp;ssl=1 683w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/00_gtk-sharp_new_project.png?resize=300%2C244&amp;ssl=1 300w\" sizes=\"auto, (max-width: 683px) 100vw, 683px\" \/><\/a><figcaption id=\"caption-attachment-819\" class=\"wp-caption-text\">Create New Project<\/figcaption><\/figure>\n<figure id=\"attachment_820\" aria-describedby=\"caption-attachment-820\" style=\"width: 630px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/01_gtk-sharp_Screenshot-New-Solution.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/01_gtk-sharp_Screenshot-New-Solution.png?resize=630%2C599\" alt=\"Select Gtk# 2.0 Project\" title=\"01_gtk-sharp_Screenshot-New Solution\" width=\"630\" height=\"599\" class=\"size-full wp-image-820\" srcset=\"https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/01_gtk-sharp_Screenshot-New-Solution.png?w=630&amp;ssl=1 630w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/01_gtk-sharp_Screenshot-New-Solution.png?resize=300%2C285&amp;ssl=1 300w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/a><figcaption id=\"caption-attachment-820\" class=\"wp-caption-text\">Select Gtk# 2.0 Project<\/figcaption><\/figure>\n<figure id=\"attachment_821\" aria-describedby=\"caption-attachment-821\" style=\"width: 704px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/02_gtk-sharp_Screenshot-New-Solution.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/02_gtk-sharp_Screenshot-New-Solution.png?resize=704%2C599\" alt=\"Select Project Features\" title=\"02_gtk-sharp_Screenshot-New Solution\" width=\"704\" height=\"599\" class=\"size-full wp-image-821\" srcset=\"https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/02_gtk-sharp_Screenshot-New-Solution.png?w=704&amp;ssl=1 704w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/02_gtk-sharp_Screenshot-New-Solution.png?resize=300%2C255&amp;ssl=1 300w\" sizes=\"auto, (max-width: 704px) 100vw, 704px\" \/><\/a><figcaption id=\"caption-attachment-821\" class=\"wp-caption-text\">Select Project Features<\/figcaption><\/figure>\n<figure id=\"attachment_822\" aria-describedby=\"caption-attachment-822\" style=\"width: 1024px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/03_gtk-sharp_Screenshot-MyGtkProject-Main.cs-MonoDevelop.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/03_gtk-sharp_Screenshot-MyGtkProject-Main.cs-MonoDevelop-1024x768.png?resize=1024%2C768\" alt=\"Hello World\" title=\"03_gtk-sharp_Screenshot-MyGtkProject - Main.cs - MonoDevelop\" width=\"1024\" height=\"768\" class=\"size-large wp-image-822\" srcset=\"https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/03_gtk-sharp_Screenshot-MyGtkProject-Main.cs-MonoDevelop.png?resize=1024%2C768&amp;ssl=1 1024w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/03_gtk-sharp_Screenshot-MyGtkProject-Main.cs-MonoDevelop.png?resize=300%2C225&amp;ssl=1 300w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/03_gtk-sharp_Screenshot-MyGtkProject-Main.cs-MonoDevelop.png?w=1212&amp;ssl=1 1212w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><figcaption id=\"caption-attachment-822\" class=\"wp-caption-text\">Hello World<\/figcaption><\/figure>\n<h3>Run project<\/h3>\n<p>You can run this boilerplate by pressing Ctrl-F5<\/p>\n<h3>Using the Designer<\/h3>\n<p>Double-click on the file named <b>MainWindow.cs<\/b> in the <b>Solution<\/b> section.  When the file opens, click the <b>Designer<\/b> button below the code view.<\/p>\n<figure id=\"attachment_830\" aria-describedby=\"caption-attachment-830\" style=\"width: 1024px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/04_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/04_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop-1024x768.png?resize=1024%2C768\" alt=\"The Designer\" title=\"04_gtk-sharp_Screenshot-MyGtkProject - MainWindow.cs - MonoDevelop\" width=\"1024\" height=\"768\" class=\"size-large wp-image-830\" srcset=\"https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/04_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop.png?resize=1024%2C768&amp;ssl=1 1024w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/04_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop.png?resize=300%2C225&amp;ssl=1 300w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/04_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop.png?w=1212&amp;ssl=1 1212w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><figcaption id=\"caption-attachment-830\" class=\"wp-caption-text\">The Designer<\/figcaption><\/figure>\n<h4>The Toolbox<\/h4>\n<p>To add the Toolbox, press Alt-Shift-B or click View->Toolbox.<\/p>\n<p>Drag a <b>VBox<\/b> widget from the Toolbox to the main window.<\/p>\n<figure id=\"attachment_831\" aria-describedby=\"caption-attachment-831\" style=\"width: 1024px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/05_gtk-sharp_add_vbox.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/05_gtk-sharp_add_vbox-1024x801.png?resize=1024%2C801\" alt=\"Add VBox\" title=\"05_gtk-sharp_add_vbox\" width=\"1024\" height=\"801\" class=\"size-large wp-image-831\" srcset=\"https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/05_gtk-sharp_add_vbox.png?resize=1024%2C801&amp;ssl=1 1024w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/05_gtk-sharp_add_vbox.png?resize=300%2C234&amp;ssl=1 300w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/05_gtk-sharp_add_vbox.png?w=1219&amp;ssl=1 1219w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><figcaption id=\"caption-attachment-831\" class=\"wp-caption-text\">Add VBox<\/figcaption><\/figure>\n<p>Drop a <b>Menu Bar<\/b> widget into the top cell of the VBox, and a <b>Statusbar<\/b> into the bottom.<\/p>\n<figure id=\"attachment_834\" aria-describedby=\"caption-attachment-834\" style=\"width: 1024px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/06_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/06_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop-1024x768.png?resize=1024%2C768\" alt=\"Insert Menu and Status Bar\" title=\"06_Screenshot-MyGtkProject - MainWindow.cs* - MonoDevelop\" width=\"1024\" height=\"768\" class=\"size-large wp-image-834\" srcset=\"https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/06_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop.png?resize=1024%2C768&amp;ssl=1 1024w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/06_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop.png?resize=300%2C225&amp;ssl=1 300w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/06_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop.png?w=1212&amp;ssl=1 1212w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><figcaption id=\"caption-attachment-834\" class=\"wp-caption-text\">Insert Menu and Status Bar<\/figcaption><\/figure>\n<h4>Properties grid<\/h4>\n<p>Drop a <b>Button<\/b> widget into the middle cell of the VBox.<br \/>\nAdd the <b>Properties<\/b> grid from the View menu (Alt+Shift+P or View->Properties).<br \/>\nSelect the new button by clicking on it.<br \/>\nIn the Properties grid, expand the <b>Button Properties<\/b> section and click the value of the <b>Label<\/b> field.  Delete the default content and replace it with a different string.<\/p>\n<figure id=\"attachment_837\" aria-describedby=\"caption-attachment-837\" style=\"width: 1024px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/07_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/07_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop-1024x676.png?resize=1024%2C676\" alt=\"Button with new Label\" title=\"07_gtk-sharp_Screenshot-MyGtkProject - MainWindow.cs* - MonoDevelop\" width=\"1024\" height=\"676\" class=\"size-large wp-image-837\" srcset=\"https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/07_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop.png?resize=1024%2C676&amp;ssl=1 1024w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/07_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop.png?resize=300%2C198&amp;ssl=1 300w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/07_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop.png?w=1409&amp;ssl=1 1409w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><figcaption id=\"caption-attachment-837\" class=\"wp-caption-text\">Button with new Label<\/figcaption><\/figure>\n<h4>Adding a Click handler<\/h4>\n<p>Select the button in the Designer view<br \/>\nIn the <b>Property<\/b> grid, select the <b>Signals<\/b> tab<br \/>\nClick twice on the text in the column to the right of the <b>Clicked<\/b> and replace <i>Click here to add a new handler<\/i> with <i>MyButtonClickHandler<\/i><\/p>\n<figure id=\"attachment_844\" aria-describedby=\"caption-attachment-844\" style=\"width: 1024px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/08_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/08_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop-1024x676.png?resize=1024%2C676\" alt=\"Add a click handler\" title=\"08_gtk-sharp_Screenshot-MyGtkProject - MainWindow.cs* - MonoDevelop\" width=\"1024\" height=\"676\" class=\"size-large wp-image-844\" srcset=\"https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/08_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop.png?resize=1024%2C676&amp;ssl=1 1024w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/08_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop.png?resize=300%2C198&amp;ssl=1 300w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/08_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop.png?w=1409&amp;ssl=1 1409w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><figcaption id=\"caption-attachment-844\" class=\"wp-caption-text\">Add a click handler<\/figcaption><\/figure>\n<p>Click on the <b>Source Code<\/b> button below the viewer window to switch to the C\u00e2\u2122\u00af code.  You can use the find tool to search for the new handler you created, called <i>MyButtonClickHandler<\/i>.  Ctrl-F will bring up the find dialogue.<br \/>\n<figure id=\"attachment_847\" aria-describedby=\"caption-attachment-847\" style=\"width: 1024px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/09_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/09_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop-1024x676.png?resize=1024%2C676\" alt=\"Browse to click handler\" title=\"09_gtk-sharp_Screenshot-MyGtkProject - MainWindow.cs* - MonoDevelop\" width=\"1024\" height=\"676\" class=\"size-large wp-image-847\" srcset=\"https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/09_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop.png?resize=1024%2C676&amp;ssl=1 1024w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/09_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop.png?resize=300%2C198&amp;ssl=1 300w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/09_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop.png?w=1409&amp;ssl=1 1409w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><figcaption id=\"caption-attachment-847\" class=\"wp-caption-text\">Browse to click handler<\/figcaption><\/figure><\/p>\n<p>Add some code to update the status bar.<\/p>\n<pre class=\"brush:c-sharp\">\r\n\tprotected virtual void MyButtonClickHandler (object sender, System.EventArgs e)\r\n\t{\r\n\t\tvar contextId = this.statusbar1.GetContextId(\"clicked\");\r\n\t\tthis.statusbar1.Push(contextId, \"Clicky-Clicky\" );\r\n\t}\r\n<\/pre>\n<figure id=\"attachment_849\" aria-describedby=\"caption-attachment-849\" style=\"width: 1023px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/10_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/10_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop-1023x556.png?resize=1023%2C556\" alt=\"Click handler code\" title=\"10_gtk-sharp_Screenshot-MyGtkProject - MainWindow.cs - MonoDevelop\" width=\"1023\" height=\"556\" class=\"size-large wp-image-849\" srcset=\"https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/10_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop.png?resize=1023%2C556&amp;ssl=1 1023w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/10_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop.png?resize=300%2C163&amp;ssl=1 300w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/10_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop.png?w=1712&amp;ssl=1 1712w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><figcaption id=\"caption-attachment-849\" class=\"wp-caption-text\">Click handler code<\/figcaption><\/figure>\n<h4>Modify button layout<\/h4>\n<p>The size of the running window is a little weird.  I fixed mine by un-setting the <b>Auto Size<\/b> boolean and setting the <b>Expand<\/b> and <b>Fill<\/b> in the <b>Box Child Layout<\/b> section of the Properties grid.<\/p>\n<figure id=\"attachment_853\" aria-describedby=\"caption-attachment-853\" style=\"width: 1024px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/11_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/11_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop-1024x684.png?resize=1024%2C684\" alt=\"Button layout changes\" title=\"11_gtk-sharp_Screenshot-MyGtkProject - MainWindow.cs* - MonoDevelop\" width=\"1024\" height=\"684\" class=\"size-large wp-image-853\" srcset=\"https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/11_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop.png?resize=1024%2C684&amp;ssl=1 1024w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/11_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop.png?resize=300%2C200&amp;ssl=1 300w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/11_gtk-sharp_Screenshot-MyGtkProject-MainWindow.cs-MonoDevelop.png?w=1072&amp;ssl=1 1072w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><figcaption id=\"caption-attachment-853\" class=\"wp-caption-text\">Button layout changes<\/figcaption><\/figure>\n<h4>Exercise button click handler<\/h4>\n<p>Run your application with Ctrl-F5 and click on the button.  You should see the new string show up in the status bar at the bottom left of the window.<\/p>\n<figure id=\"attachment_855\" aria-describedby=\"caption-attachment-855\" style=\"width: 309px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/12_gtk-sharp_unclicked.png\" target=\"_blank\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/12_gtk-sharp_unclicked.png?resize=309%2C105\" alt=\"Not yet clicked\" title=\"12_gtk-sharp_unclicked\" width=\"309\" height=\"105\" class=\"size-full wp-image-855\" srcset=\"https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/12_gtk-sharp_unclicked.png?w=309&amp;ssl=1 309w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/12_gtk-sharp_unclicked.png?resize=300%2C101&amp;ssl=1 300w\" sizes=\"auto, (max-width: 309px) 100vw, 309px\" \/><\/a><figcaption id=\"caption-attachment-855\" class=\"wp-caption-text\">Not yet clicked<\/figcaption><\/figure>\n<figure id=\"attachment_856\" aria-describedby=\"caption-attachment-856\" style=\"width: 309px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/13_gtk-sharp_clicked.png\" target=\"_blank\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/13_gtk-sharp_clicked.png?resize=309%2C105\" alt=\"Clicked + Status update\" title=\"13_gtk-sharp_clicked\" width=\"309\" height=\"105\" class=\"size-full wp-image-856\" srcset=\"https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/13_gtk-sharp_clicked.png?w=309&amp;ssl=1 309w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/13_gtk-sharp_clicked.png?resize=300%2C101&amp;ssl=1 300w\" sizes=\"auto, (max-width: 309px) 100vw, 309px\" \/><\/a><figcaption id=\"caption-attachment-856\" class=\"wp-caption-text\">Clicked + Status update<\/figcaption><\/figure>\n<h4>Add Menu items<\/h4>\n<figure id=\"attachment_862\" aria-describedby=\"caption-attachment-862\" style=\"width: 1024px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/14_gtk-sharp_Create_File_Menu_Entry.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/14_gtk-sharp_Create_File_Menu_Entry-1024x684.png?resize=1024%2C684\" alt=\"Create File Menu Entry\" title=\"14_gtk-sharp_Create_File_Menu_Entry\" width=\"1024\" height=\"684\" class=\"size-large wp-image-862\" srcset=\"https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/14_gtk-sharp_Create_File_Menu_Entry.png?resize=1024%2C684&amp;ssl=1 1024w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/14_gtk-sharp_Create_File_Menu_Entry.png?resize=300%2C200&amp;ssl=1 300w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/14_gtk-sharp_Create_File_Menu_Entry.png?w=1072&amp;ssl=1 1072w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><figcaption id=\"caption-attachment-862\" class=\"wp-caption-text\">Create File Menu Entry<\/figcaption><\/figure>\n<a href=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/15_gtk-sharp_Create_File-Quit_Menu_Item.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/15_gtk-sharp_Create_File-Quit_Menu_Item-1024x684.png?resize=1024%2C684\" alt=\"Create File-&gt;Quit Menu Item\" title=\"15_gtk-sharp_Create_File-Quit_Menu_Item\" width=\"1024\" height=\"684\" class=\"size-large wp-image-863\" srcset=\"https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/15_gtk-sharp_Create_File-Quit_Menu_Item.png?resize=1024%2C684&amp;ssl=1 1024w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/15_gtk-sharp_Create_File-Quit_Menu_Item.png?resize=300%2C200&amp;ssl=1 300w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/15_gtk-sharp_Create_File-Quit_Menu_Item.png?w=1072&amp;ssl=1 1072w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a>\n<figure id=\"attachment_864\" aria-describedby=\"caption-attachment-864\" style=\"width: 1024px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/16_gtk-sharp_Add_quit_event_handler.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/16_gtk-sharp_Add_quit_event_handler-1024x684.png?resize=1024%2C684\" alt=\"Add Quit event handler\" title=\"16_gtk-sharp_Add_quit_event_handler\" width=\"1024\" height=\"684\" class=\"size-large wp-image-864\" srcset=\"https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/16_gtk-sharp_Add_quit_event_handler.png?resize=1024%2C684&amp;ssl=1 1024w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/16_gtk-sharp_Add_quit_event_handler.png?resize=300%2C200&amp;ssl=1 300w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/16_gtk-sharp_Add_quit_event_handler.png?w=1072&amp;ssl=1 1072w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><figcaption id=\"caption-attachment-864\" class=\"wp-caption-text\">Add Quit event handler<\/figcaption><\/figure>\n<figure id=\"attachment_865\" aria-describedby=\"caption-attachment-865\" style=\"width: 1024px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/17_gtk-sharp_Add_Clear_Statusbar_Activate_Handler.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/wp.colliertech.org\/cj\/wp-content\/uploads\/2010\/04\/17_gtk-sharp_Add_Clear_Statusbar_Activate_Handler-1024x684.png?resize=1024%2C684\" alt=\"Add Clear Statusbar Activate Handler\" title=\"17_gtk-sharp_Add_Clear_Statusbar_Activate_Handler\" width=\"1024\" height=\"684\" class=\"size-large wp-image-865\" srcset=\"https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/17_gtk-sharp_Add_Clear_Statusbar_Activate_Handler.png?resize=1024%2C684&amp;ssl=1 1024w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/17_gtk-sharp_Add_Clear_Statusbar_Activate_Handler.png?resize=300%2C200&amp;ssl=1 300w, https:\/\/i0.wp.com\/wp.c9h.org\/cj\/wp-content\/uploads\/2010\/04\/17_gtk-sharp_Add_Clear_Statusbar_Activate_Handler.png?w=1072&amp;ssl=1 1072w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><figcaption id=\"caption-attachment-865\" class=\"wp-caption-text\">Add Clear Statusbar Activate Handler<\/figcaption><\/figure>\n\n<div class=\"twitter-share\"><a href=\"https:\/\/twitter.com\/intent\/tweet?via=cjamescollier\" class=\"twitter-share-button\">Tweet<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>This is a quick tutorial for getting a first gtk-sharp app up and going. Install MonoDevelop $ sudo apt-get install monodevelop libgtk2.0-cil-dev Start MonoDevelop It&#8217;ll be in your GNOME application menu under Applications->Programming->MonoDevelop Create a new Gtk# Project Run project You can run this boilerplate by pressing Ctrl-F5 Using the Designer Double-click on the file [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[38,17,79,75,62,7,130,210],"tags":[],"class_list":["post-818","post","type-post","status-publish","format-standard","hentry","category-c","category-debian","category-free-software","category-gnome","category-gtk","category-mono","category-ubuntu","category-ubuntu-us-wa"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1YDIB-dc","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=\/wp\/v2\/posts\/818","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=818"}],"version-history":[{"count":28,"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=\/wp\/v2\/posts\/818\/revisions"}],"predecessor-version":[{"id":843,"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=\/wp\/v2\/posts\/818\/revisions\/843"}],"wp:attachment":[{"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=818"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=818"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=818"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}