Gtk# Embed TextView in ToolBar
Is there any way to embed a TextView widget in a ToolBar? I am using开发者_开发问答 Gtk# with C# on mono in Linux.
I recently had to do this for a project and was able to accomplish by manually setting the Width and Height Request. Putting the TextView in a HBox (or similar) also works.
Toolbar _toolBar = new Toolbar();
TextView t = new TextView();
t.WidthRequest = 200;
t.HeightRequest = 20;
_toolBar.Add(t);
t.Buffer.Text = "Hello World!";
t.Visible = true;
精彩评论