Re: Gtkmm box widget container pack_start
- From: cppgangster <lubys jo gmail com>
- To: gtkmm-list gnome org
- Subject: Re: Gtkmm box widget container pack_start
- Date: Thu, 10 Feb 2011 09:47:22 -0800 (PST)
Hi! I am really sorry, I just figured out the problem, it was IDE, I wrongly
set parameters.
Guillaume Brocker-2 wrote:
>
> Hi !
>
> Please, can you tell us a little more about the platform you are
> compiling on ?
>
> I compiled and run your code successfully on windows, using VC++ studio
> 2008 and gtkmm 2.22.0. So for me, your code is alright.
>
> May be you could improve by avoiding to include files using the library
> version in the path :
> > #include<gtkmm-2.4/gtkmm/container.h>
> > #include<sigc++-2.0/sigc++/functors/ptr_fun.h>
> > #include<sigc++-2.0/sigc++/functors/mem_fun.h>
>
> Regards.
> Guillaume
>
> Le 08/02/2011 23:17, cppgangster a écrit :
>>
>> Hi sorry I reposting a question, because I cant find the answer, my code
>> is
>> here:
>> /*
>> * File: main.cpp
>> * Author: cppguy
>> *
>> * Created on 07 February 2011, 22:20
>> */
>>
>> #include<cstdlib>
>> #include "newfile.hpp"
>> #include "gtkmm/main.h"
>>
>> using namespace std;
>>
>> /*
>> *
>> */
>> int main(int argc, char** argv) {
>>
>> Gtk::Main k(argc,argv);
>> window wi;
>> Gtk::Main::run(wi);
>> return 0;
>> }
>>
>> /*
>> * File: newfile.hpp
>> * Author: cppguy
>> *
>> * Created on 07 February 2011, 22:22
>> */
>>
>> #ifndef NEWFILE_HPP
>> #define NEWFILE_HPP
>> #include "gtkmm/window.h"
>> #include "gtkmm/scrollbar.h"
>> #include "gtkmm/adjustment.h"
>> #include "gtkmm/box.h"
>> #include "gtkmm/label.h"
>> #include "gtkmm/scale.h"
>> #include "gtkmm/togglebutton.h"
>> class window:public Gtk::Window{
>> public:
>> window();
>> ~window();
>> private:
>>
>> Gtk::VScrollbar bar;
>> Gtk::Adjustment adjust_bar;
>> Gtk::HBox hbox;
>> Gtk::VBox vbox;
>> Gtk::Label label,togg_label;
>> Gtk::HScale hscale;
>> Gtk::ToggleButton togglb,togglb1;
>> };
>>
>> #endif /* NEWFILE_HPP */
>>
>> #include<gtkmm-2.4/gtkmm/container.h>
>> #include<sigc++-2.0/sigc++/functors/ptr_fun.h>
>> #include<sigc++-2.0/sigc++/functors/mem_fun.h>
>>
>> #include "newfile.hpp"
>> #include "gtkmm.h"
>> #include<iostream>
>> #include "gtkmm/togglebutton.h"
>>
>> window::window():
>> adjust_bar(3.0,0.0,30.0),
>> hbox(false,15),
>> vbox(false,15),
>> label("Pastumdykmane!!! "),
>> togg_label("ksdjnsd"),
>> togglb("Paspausk mane!!! "),
>> togglb1("nespausk manes!! ")
>>
>>
>> {
>>
>> set_border_width(5);
>> set_title("slankiklis");
>> bar.set_adjustment(adjust_bar);
>> hscale.set_adjustment(adjust_bar);
>>
>> hbox.pack_start(bar);
>> hbox.pack_start(vbox);
>>
>> vbox.pack_start(label);
>> vbox.pack_start(hscale);
>> vbox.pack_start(togglb);
>> vbox.add(togg_label);
>> vbox.pack_start(togglb1);
>>
>> add(hbox);
>>
>> show_all_children();
>> }
>> window::~window(){}
>>
>> When I compile I get exit value 1, I assume the problem is that when I
>> put
>> the last toggle button to vbox
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>
>
--
View this message in context: http://old.nabble.com/Gtkmm-box-widget-container-pack_start-tp30877189p30894680.html
Sent from the Gtkmm mailing list archive at Nabble.com.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]