简体   繁体   English

在Gtk中打开现有窗口#

[英]Open existing window in Gtk#

I have added a new window to the project and the name of the window is Actwindow . 我向项目添加了一个新窗口,该窗口的名称为Actwindow How can I open this window? 如何打开此窗口?

I tried using Actwindow=new Window(); 我尝试使用Actwindow=new Window(); but it does not work. 但它不起作用。

The window code is: 窗口代码是:

using System;

namespace myproject
{
    public partial class Actwindow : Gtk.Window
    {
        public Actwindow () :
            base (Gtk.WindowType.Toplevel)
        {
            this.Build ();
        }
    }
}

What am I doing wrong? 我究竟做错了什么?

Actwindow myWindow = new Actwindow();
myWindow.Show(); // or similar

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM