You are not logged in.
When I set the function set_resizable to false, the window open too small and only shows the label .
What am I making wrong ?
The code:
#include <gtkmm/window.h>
#include <gtkmm/main.h>
#include <gtkmm/layout.h>
#include <gtkmm/button.h>
#include <gtkmm/box.h>
#include <gtkmm/buttonbox.h>
#include <gtkmm/label.h>
class Janela : public Gtk::Window{
public:
Janela() :
layout(),
adicionar("Adicionar"),
remover("Remover"),
pesquisar("Pesquisar"),
sobre("Sobre"),
cvbotao(Gtk::BUTTONBOX_START, 10),
label("bla bla bla bla"),
caixa(){
Gtk::Window::set_size(500,300);
Gtk::Window::set_resizable(false);
Gtk::Window::set_title("Receitas Vegetarianas");
add(caixa);
caixa.pack_start(layout);
caixa.pack_end(label);
cvbotao.add(pesquisar);
cvbotao.add(adicionar);
cvbotao.add(remover);
cvbotao.add(sobre);
layout.put(cvbotao,30,140);
layout.show();
label.show();
cvbotao.show();
adicionar.show();
remover.show();
pesquisar.show();
sobre.show();
caixa.show();
}
~Janela(){
}
protected:
Gtk::Button adicionar;
Gtk::Button remover;
Gtk::Button pesquisar;
Gtk::Button sobre;
Gtk::Layout layout;
Gtk::VButtonBox cvbotao;
Gtk::Label label;
Gtk::HBox caixa;
};
int main(int argc, char * argv[]){
Gtk::Main kit(argc, argv);
Janela janela;
Gtk::Main::run(janela);
}
How did you know? I love this song!
Offline
please somebody delete this topic I got fix the problem change set_size by set_size_request.
Thanks
How did you know? I love this song!
Offline