<?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" xmlns:its="http://www.w3.org/2005/11/its" type="topic" style="task" id="tour-get_object" xml:lang="de">
<info>
<link type="next" xref="tour-application"/>
<revision version="0.1" date="2013-06-17" status="stub"/>
<credit type="author copyright">
<name>Ekaterina Gerasimova</name>
<email its:translate="no">kittykat3756@gmail.com</email>
<years>2013</years>
</credit>
<credit type="author copyright">
<name>Gordon Hill</name>
<email its:translate="no">caseyweederman@gmail.com</email>
<years>2013</years>
</credit>
<include xmlns="http://www.w3.org/2001/XInclude" href="cc-by-sa-3-0.xml"/>
<desc>F체gen Sie das in der UI-Datei spezifizierte Fenster mittels GtkBuilder zur Anwendung hinzu.</desc>
<mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
<mal:name>Mario Bl채ttermann</mal:name>
<mal:email>mario.blaettermann@gmail.com</mal:email>
<mal:years>2009-2012, 2016</mal:years>
</mal:credit>
<mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
<mal:name>Christian Kirbach</mal:name>
<mal:email>christian.kirbach@gmail.com</mal:email>
<mal:years>2011, 2012, 2015, 2017, 2018</mal:years>
</mal:credit>
<mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
<mal:name>Aljosha Papsch</mal:name>
<mal:email>al@rpapsch.de</mal:email>
<mal:years>2012</mal:years>
</mal:credit>
</info>
<title>GtkBuilder</title>
<links type="prevnext" style="top"/>
<links type="series" style="floatend">
<title>Erste Schritte mit GNOME</title>
</links>
<p>GtkBuilder wandelt UI-Beschreibungen in Gtk-Anwendungen um. In diesem Fall befindet sich die UI-Beschreibung in der Datei <file>helloworld.glade</file> und kann mit der Methode <code>get_object()</code> gelesen werden.</p>
<example>
<p>Laden Sie die UI-Datei mit <code>GtkBuilder</code> und holen Sie das Fenster-Objekt mit dem in Glade gew채hlten <gui>Name</gui> (oder <gui>ID</gui>) und f체gen Sie das Fenster-Objekt zur Anwendung hinzu:</p>
<code>
_onStartup() {
let builder = new Gtk.Builder();
builder.add_from_file('helloworld.glade');
this._window = builder.get_object('window1');
this.application.add_window(this._window);
}
};
</code>
</example>
<links type="prevnext"/>
</page>