Outils pour utilisateurs

Outils du site


kivy_comment_faire_un_tas_de_chose

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
Prochaine révisionLes deux révisions suivantes
kivy_comment_faire_un_tas_de_chose [2020/01/19 08:00] – [Texte en gras dans un label] sergekivy_comment_faire_un_tas_de_chose [2020/01/20 17:39] – [Button color_background] serge
Ligne 1: Ligne 1:
-======Kivy: Comment faire un tas de chose======+======Kivy: Comment faire un tas de chose ======
 <WRAP center round box 60% centeralign> <WRAP center round box 60% centeralign>
 **{{tagpage>kivy|Toutes les pages Kivy}}**   **{{tagpage>kivy|Toutes les pages Kivy}}**  
Ligne 5: Ligne 5:
 </WRAP> </WRAP>
  
 +===== Comment chercher ? =====
 +====Sur internet====
 +  * Dans la **[[https://kivy.org/doc/stable/|doc officielle]]**, mais les chances de trouver sont quasi nulles.
 +  * Dans un moteur de recherche: ça finit souvent par des posts sur stackoverflow, avec des réponses <del>médiocres</del> fausses, uniquement motivées par le gain de points !
  
 +====Une bonne solution: Les exemples des sources de kivy====
 +  * Télécharger les sources sur [[https://github.com/kivy/kivy|github]]
 +  * Dans votre EDI créer un projet avec uniquement les [[https://github.com/kivy/kivy/tree/master/examples|exemples]]
 +  * Rechercher dans les fichiers: si vous chercher "source:", vous aurez la liste de tous les fichiers qui utilisent "source:". Si c'est un kv, trouver le .py corespondant pour l'exécuter.
 +
 +=====Des explications avec les exemples des sources=====
 +Une liste de scripts qui explique bien:
 +
 +  * **pos_hint** : [[https://github.com/kivy/kivy/blob/master/examples/widgets/boxlayout_poshint.py|boxlayout_poshint.py]]
 +  * **bubble** : [[https://github.com/kivy/kivy/blob/master/examples/widgets/bubble_test.py|bubble_test.py]]
 +  * **camera** : [[https://github.com/kivy/kivy/blob/master/examples/widgets/camera.py|camera.py]]
 +  * **carousel** : [[https://github.com/kivy/kivy/blob/master/examples/widgets/carousel_buttons.py|carousel_buttons.py]]
 +  * **mipmap** : [[https://github.com/kivy/kivy/blob/master/examples/widgets/label_mipmap.py|label_mipmap.py]]
 +  * **text_size = textwrap** : [[https://github.com/kivy/kivy/blob/master/examples/widgets/label_text_size.py|label_text_size.py]]
 +  * **text with markup** : [[https://github.com/kivy/kivy/blob/master/examples/widgets/label_with_markup.py|label_with_markup.py]]
 +  * **popup** : [[https://github.com/kivy/kivy/blob/master/examples/widgets/popup_with_kv.py|popup_with_kv.py]]
 +  * **scatter** : [[https://github.com/kivy/kivy/blob/master/examples/widgets/scatter.py|scatter.py]] et [[https://github.com/kivy/kivy/blob/master/examples/widgets/scatter.kv|scatter.kv]]
 +  * **scrollview** : [[https://github.com/kivy/kivy/blob/master/examples/widgets/scrollview.py|scrollview.py]] et [[https://github.com/kivy/kivy/blob/master/examples/widgets/scrollview.kv|scrollview.kv]]
 +  * **splitter** : [[https://github.com/kivy/kivy/blob/master/examples/widgets/splitter.py|splitter.py]]
 +  * **tabbed panel = onglet** : [[https://github.com/kivy/kivy/blob/master/examples/widgets/tabbedpanel.py|tabbedpanel.py]]
 +  * **text align** : [[https://github.com/kivy/kivy/blob/master/examples/widgets/textalign.py|textalign.py]] [[https://github.com/kivy/kivy/blob/master/examples/widgets/textalign.kv|textalign.kv]]
 +  * **video player** : [[https://github.com/kivy/kivy/blob/master/examples/widgets/videoplayer.py|videoplayer.py]]
 +  * **ErrorPopup(Popup)** : [[https://github.com/kivy/plyer/blob/master/examples/text2speech/main.py|main.py]] et [[https://github.com/kivy/plyer/blob/master/examples/text2speech/text2speechdemo.kv|text2speechdemo.kv]]
 =====Comment lister tous les widgets dans le python===== =====Comment lister tous les widgets dans le python=====
   * **[[https://kivy.org/doc/stable/api-kivy.uix.widget.html#kivy.uix.widget.Widget.walk|walking this tree]]**   * **[[https://kivy.org/doc/stable/api-kivy.uix.widget.html#kivy.uix.widget.Widget.walk|walking this tree]]**
Ligne 45: Ligne 72:
  
  
-===== La commande magique ===== 
- 
-Dans Blender, le raccourcis magique c'est: 
-**Ctrl + A** Apply the object's transformation to its data 
- 
-Dans le *.kv, c'est: [[https://kivy.org/docs/api-kivy.lang.html|Graphical Instructions]] 
- 
-<code python> 
-    canvas: 
-        Clear 
-</code> 
  
  
Ligne 126: Ligne 142:
     ...     ...
     ...     ...
 +</code>
 +
 +=====Button background_color=====
 +<code python>
 +Button:
 +    background_normal: ''
 +    background_color: 1, .3, .4, .85
 </code> </code>
  
kivy_comment_faire_un_tas_de_chose.txt · Dernière modification : 2022/11/19 09:49 de serge