开发者

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;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜