<?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" xmlns:its="http://www.w3.org/2005/11/its" xmlns:e="http://projectmallard.org/experimental/" type="guide" style="task" id="tutorial.py" xml:lang="sv">

<info>
  <title type="text">Handledning för nybörjare (Python)</title>
  <link type="guide" xref="py#tutorial"/>
  <revision pkgversion="3.8" date="2013-02-25" status="draft"/>

  <desc>En handledning för nybörjare som vill lära sig hur de kan programmera grafiska användargränssnitt med GTK+ i Python.</desc>
  <credit type="author copyright">
    <name>Tiffany Antopolski</name>
    <email its:translate="no">tiffany.antopolski@gmail.com</email>
    <years>2012</years>
  </credit>
  <credit type="author copyright">
    <name>Marta Maria Casetti</name>
    <email its:translate="no">mmcasetti@gmail.com</email>
    <years>2012 2013</years>
  </credit>
  <credit type="editor author">
    <name>Jim Campbell</name>
    <email its:translate="no">jwcampbell@gmail.com</email>
    <years>2013</years>
  </credit>

    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Sebastian Rasmussen</mal:name>
      <mal:email>sebras@gmail.com</mal:email>
      <mal:years>2019</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Anders Jonsson</mal:name>
      <mal:email>anders.jonsson@norsjovallen.se</mal:email>
      <mal:years>2021</mal:years>
    </mal:credit>
  </info>

<title>Handledning för nybörjare</title>

<synopsis>
 <p>Genom att följa dessa handledningar kommer du att lära dig grundläggande programmering av grafiska användargränssnitt med GTK+ i Python.</p>

 <p>Om du aldrig har programmerat förr, eller inte är bekant med koncepten i objektorienterad programmering, så kan du behöva lära dig lite grunder först. Boken <link href="http://learnpythonthehardway.org/book/">Learn Python the Hard Way</link> eller <link href="http://docs.python.org/tutorial/index.html">Python-handledningen</link> kan vara ett bättre ställe för dig att börja. Du kan också vara intresserad av <link href="http://python-gtk-3-tutorial.readthedocs.org/en/latest/index.html">GTK+ 3-handledningen för Python</link>. Se till att komma tillbaka och ta en titt på de här handledningarna då du bemästrat grunderna.</p>
</synopsis>

<links type="section"/>

<section id="to-run">
<title>För att köra kodexemplen</title>

  <p>För att köra kodexemplen i handledningen:</p>
  <steps>
    <item><p>Skriv eller kopiera och klistra in koden i en fil, och spara filen med ett namn som <var>filnamn</var>.py</p></item>
    <item><p>Skriv följande i terminalen för att köra koden:</p>
          <screen>python <var>filnamn</var>.py</screen>
    </item>
  </steps>
  <p>Efter att du kör koden kommer du antingen se komponenten på din skärm, eller (om du skrivit någon del av koden fel) så kommer du se ett felmeddelande som kommer hjälpa dig att identifiera felet.</p>
</section>

<section id="widgets">
<title>En väg genom komponenterna (med lite teori)</title>
<p>Handledningen kommer följa dig genom alltmer komplexa exempel och programmeringsteori, men känn dig även fri att bara gå direkt till den handledning som är till mest hjälp för dig.</p>
<steps>
  <title>Handledning</title>
  <item><steps>
    <title>Enkla fönster</title>
    <item><p><link xref="window.py"/></p></item>
    <item><p><link xref="GtkApplicationWindow.py"/></p></item>
  </steps></item>
  <item><steps>
    <title>Bilder och etiketter</title>
    <item><p><link xref="image.py"/></p></item>
    <item><p><link xref="strings.py"/></p></item>
    <item><p><link xref="label.py"/></p></item>
  </steps></item>
  <item><steps>
    <title>Introduktion till egenskaper</title>
    <item><p><link xref="properties.py"/></p></item>
  </steps></item>
  <item><steps>
    <title>Rutnät, avskiljare och rullning</title>
    <item><p><link xref="grid.py"/></p></item>
    <item><p><link xref="separator.py"/></p></item>
    <item><p><link xref="scrolledwindow.py"/></p></item>
    <item><p><link xref="paned.py"/></p></item>
  </steps></item>
  <item><steps>
    <title>Signaler, återanrop och knappar</title>   
    <item><p><link xref="signals-callbacks.py"/></p></item>
    <item><p><link xref="button.py"/></p></item>
    <item><p><link xref="linkbutton.py"/></p></item>
    <item><p><link xref="checkbutton.py"/></p></item>
    <item><p><link xref="togglebutton.py"/></p></item>
    <item><p><link xref="switch.py"/></p></item>
    <item><p><link xref="radiobutton.py"/></p></item>
  </steps></item>
  <item><steps>
    <title>ButtonBox</title>
    <item><p><link xref="buttonbox.py"/></p></item>
  </steps></item>
  <item><steps>
    <title>Andra visningskomponenter</title>
    <item><p><link xref="statusbar.py"/></p></item>
    <item><p><link xref="spinner.py"/></p></item>
    <item><p><link xref="progressbar.py"/></p></item>
  </steps></item>
  <item><steps>
    <title>Inmatningskomponenter</title>
    <item><p><link xref="spinbutton.py"/></p></item>
    <item><p><link xref="entry.py"/></p></item>
    <item><p><link xref="scale.py"/></p></item>
  </steps></item>
  <item><steps>
    <title>En komponent för att skriva och visa text</title>
    <item><p><link xref="textview.py"/></p></item>
  </steps></item>
  <item><steps>
    <title>Dialoger</title>
    <item><p><link xref="dialog.py"/></p></item>
    <item><p><link xref="aboutdialog.py"/></p></item>
    <item><p><link xref="messagedialog.py"/></p></item>
  </steps></item>
  <item><steps>
    <title>Menyer, verktygsfält och inforutor (även: användning av Glade och GtkBuilder)</title>
    <item><p><link xref="gmenu.py"/></p></item>
    <item><p><link xref="menubutton.py"/></p></item>
    <item><p><link xref="toolbar.py"/></p></item>
    <item><p><link xref="tooltip.py"/></p></item>
    <item><p><link xref="toolbar_builder.py"/></p></item>
    <item><p><link xref="menubar.py"/></p></item>
  </steps></item>
  <item><steps>
    <title>Väljare</title>
    <item><p><link xref="colorbutton.py"/></p></item>
    <item><p><link xref="fontchooserwidget.py"/></p></item>
    <item><p><link xref="filechooserdialog.py"/></p></item>
  </steps></item>
  <item><steps>
    <title>TreeViews and ComboBoxes (using the M/V/C design)</title>
    <item><p><link xref="combobox.py"/></p></item>
    <item><p><link xref="treeview_simple_liststore.py"/></p></item>
    <item><p><link xref="treeview_treestore.py"/></p></item>
    <item><p><link xref="model-view-controller.py"/></p></item>
    <item><p><link xref="combobox_multicolumn.py"/></p></item>
    <item><p><link xref="treeview_advanced_liststore.py"/></p></item>
    <item><p><link xref="treeview_cellrenderertoggle.py"/></p></item>
  </steps></item>
  <item><steps>
    <title>Anpassad komponent</title>
    <item><p><link xref="widget_drawing.py"/></p></item>
  </steps></item>
</steps>
</section>

</page>
