Re: [Vala] Problem with textview (it resize automatically...)

2012-10-18 Thread raum
I may have asked a bit too soon.

It seems TextView must go inside a scrolled window.

Forgive me ^___^

Raum
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] [VALA] Problem with textview (it resize automatically...)

2012-10-18 Thread raum
Hi,

I've got a problem with Gtk 3 / Glade... When I add too much lines in my
textview, it gets bigger and recovers the other widgets of my window !


Below, you could see my code... Where am I wrong ? Any advice ??

thanks

Regards

-- TEST4.VALA ---

using Gtk;

class TestApp  : Gtk.ApplicationWindow {
const string UI = "test.ui";
public Window main_window;
public TextView tview;
public TextBuffer buffer;

public TestApp() {
Builder builder = new Builder();
builder.add_from_file(UI);
main_window = builder.get_object("window1") as Window;
main_window.destroy.connect(Gtk.main_quit);
builder.connect_signals(this);

tview = builder.get_object("textview1") as Gtk.TextView;
buffer = tview.get_buffer();
for (int i = 0; i < 25; i++)
buffer.text += "test " + i.to_string() + "\n";
}

[CCode (cname = "G_MODULE_EXPORT on_start")]
public void on_start(Button source){
var messagedialog = new Gtk.MessageDialog (main_window,
Gtk.DialogFlags.MODAL,
Gtk.MessageType.WARNING,
Gtk.ButtonsType.OK_CANCEL,
"This action will cause the universe to stop
existing.");

if (messagedialog.run() == ResponseType.OK) {
stdout.printf ("tata\r\n");
messagedialog.destroy();
}
}

}

void main(string[] args) {
Gtk.init (ref args);
TestApp h = new TestApp();
h.main_window.show_all();
Gtk.main();
}

 TEST.UI 


  
  
600
400
False
False

  
True
False

  
button
119
32
True
True
True
top

  
  
15
360
  


  
True
False
False
450
300

  
  
15
16
  

  

  


___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list