Hello everyone, So, here's the Widget Hierarchy of my application
Gtk::Window
---Gtk::TextView
--------Gtk::Fixed
----------Gtk::ScrolledWindow
-------------Gtk::TableView
Scroll bars of Gtk::ScrolledWindow are not showing up.
here's the code
Code:
#include<gtkmm.h>
class FuncModelColumns : public Gtk::TreeModel::ColumnRecord
{
public:
FuncModelColumns(){add(m_col);}
Gtk::TreeModelColumn<Glib::ustring> m_col;
};
int main(int argc,char *argv[])
{
Gtk::Main kit(argc,argv);
Gtk::Window main_win;
Gtk::Fixed fixed;
Gtk::ScrolledWindow scrollwin;
Gtk::TreeView tree_view;
Glib::RefPtr<Gtk::ListStore> list_store;
FuncModelColumns func_model_columns;
Gtk::TextView txt;
main_win.add(txt);
scrollwin.set_policy(Gtk::POLICY_ALWAYS,Gtk::POLICY_ALWAYS);
list_store = Gtk::ListStore::create(func_model_columns);
tree_view.set_model(list_store);
tree_view.append_column("Functions", func_model_columns.m_col);
scrollwin.add(tree_view);
scrollwin.set_size_request(181,151);
fixed.put(scrollwin,100,100);
txt.add(fixed);
for(int i =0;i<10;i++)
{
Gtk::TreeModel::Row row = *(list_store->append());
row[func_model_columns.m_col] = "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL";
}
main_win.set_size_request(600,400);
main_win.show_all_children();
Gtk::Main::run(main_win);
return 0;
}
Can anyone of you please tell me a way to show scrollbars