FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.
FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC

Développement d'applications avec le langage Panoramic
 
AccueilAccueil  RechercherRechercher  Dernières imagesDernières images  S'enregistrerS'enregistrer  MembresMembres  Connexion  
Derniers sujets
» Gestion d'un système client-serveur.
LIST_VIEW & SWITCH Emptypar Klaus Ven 17 Mai 2024 - 14:02

» item_index(résolu)
LIST_VIEW & SWITCH Emptypar jjn4 Mar 14 Mai 2024 - 19:38

» Bataille terrestre
LIST_VIEW & SWITCH Emptypar jjn4 Lun 13 Mai 2024 - 15:01

» SineCube
LIST_VIEW & SWITCH Emptypar Marc Sam 11 Mai 2024 - 12:38

» Editeur EliP 6 : Le Tiny éditeur avec 25 onglets de travail
LIST_VIEW & SWITCH Emptypar Marc Sam 11 Mai 2024 - 12:22

» Philharmusique
LIST_VIEW & SWITCH Emptypar jjn4 Ven 10 Mai 2024 - 13:58

» PANORAMIC V 1
LIST_VIEW & SWITCH Emptypar papydall Jeu 9 Mai 2024 - 3:22

» select intégrés [résolu]
LIST_VIEW & SWITCH Emptypar jjn4 Mer 8 Mai 2024 - 17:00

» number_mouse_up
LIST_VIEW & SWITCH Emptypar jjn4 Mer 8 Mai 2024 - 11:59

» Aide de PANORAMIC
LIST_VIEW & SWITCH Emptypar jjn4 Mer 8 Mai 2024 - 11:16

» trop de fichiers en cours
LIST_VIEW & SWITCH Emptypar lepetitmarocain Mer 8 Mai 2024 - 10:43

» Je teste PANORAMIC V 1 beta 1
LIST_VIEW & SWITCH Emptypar papydall Mer 8 Mai 2024 - 4:17

» bouton dans autre form que 0(résolu)
LIST_VIEW & SWITCH Emptypar leclode Lun 6 Mai 2024 - 13:59

» KGF_dll - nouvelles versions
LIST_VIEW & SWITCH Emptypar Klaus Lun 6 Mai 2024 - 11:41

» @Jack
LIST_VIEW & SWITCH Emptypar Jack Mar 30 Avr 2024 - 20:40

Navigation
 Portail
 Index
 Membres
 Profil
 FAQ
 Rechercher
Rechercher
 
 

Résultats par :
 
Rechercher Recherche avancée
Mai 2024
LunMarMerJeuVenSamDim
  12345
6789101112
13141516171819
20212223242526
2728293031  
CalendrierCalendrier
-55%
Le deal à ne pas rater :
Coffret d’outils – STANLEY – STMT0-74101 – 38 pièces – ...
21.99 € 49.04 €
Voir le deal

 

 LIST_VIEW & SWITCH

Aller en bas 
+2
jjn4
GERYAN
6 participants
AuteurMessage
GERYAN

GERYAN


Nombre de messages : 10
Date d'inscription : 17/11/2019

LIST_VIEW & SWITCH Empty
MessageSujet: LIST_VIEW & SWITCH   LIST_VIEW & SWITCH EmptyMar 26 Nov 2019 - 16:38

Bonjour Jack
Y a t il une doc quelque part pour les objets LIST_VIEW et SWITCH ?
Revenir en haut Aller en bas
jjn4

jjn4


Nombre de messages : 2709
Date d'inscription : 13/09/2009

LIST_VIEW & SWITCH Empty
MessageSujet: +++   LIST_VIEW & SWITCH EmptyMar 26 Nov 2019 - 19:24

A ma connaissance, ces deux notions n'existent pas en panoramic...?
A moins que ce ne soit en cours de développement...
Non ?
Quelqu'un en sait plus ?
scratch
Revenir en haut Aller en bas
http://jjn4.e-monsite.com
GERYAN

GERYAN


Nombre de messages : 10
Date d'inscription : 17/11/2019

LIST_VIEW & SWITCH Empty
MessageSujet: re   LIST_VIEW & SWITCH EmptyMar 26 Nov 2019 - 20:48

Jack a écrit:
Objets utilisables dans Panoramic pour Android :
BUTTON
EDIT
MEMO
COMBO
ALPHA
LIST
PICTURE
CHECK
OPTION
SOUND
TRACK_BAR
SCROLL_BAR
PROGRESS_BAR
SPIN
GRID
CONTAINER
DLIST
TIMER
PANEL
HVIEWER
IMAGE
LIST_VIEW *
SWITCH *


Objets n'existant pas dans Panoramic pour Android, parce que n'existant pas sous Android:
FORM
MAIN_MENU
SUB_MENU
OPEN_DIALOG
SAVE_DIALOG

* Objets existants dans Panoramic pour Android, mais n'existant pas dans Panoramic pour Windows:
LIST_VIEW
SWITCH

Mais pas de doc ?...


Dernière édition par GERYAN le Mar 26 Nov 2019 - 20:50, édité 2 fois
Revenir en haut Aller en bas
JL35




Nombre de messages : 7095
Localisation : 77
Date d'inscription : 29/11/2007

LIST_VIEW & SWITCH Empty
MessageSujet: Re: LIST_VIEW & SWITCH   LIST_VIEW & SWITCH EmptyMar 26 Nov 2019 - 20:49

J'ai pas trouvé LIST_VIEW, mais SWITCH ça existe, pour déclencher un événement en bascule (oui/non),
comme un interrupteur, 2 positions, on/off.

PS on s'est croisés, j'ai trouvé le SWITCH dans l'éditeur windows (c'est le même pour androïd ou non ?) mais je n('ai pas testé, je vais essayer pour voir.

PS2 effectivement, l'éditeur me dit 'Illegal instruction'... donc Jack a raison.


Dernière édition par JL35 le Mar 26 Nov 2019 - 20:53, édité 1 fois
Revenir en haut Aller en bas
GERYAN

GERYAN


Nombre de messages : 10
Date d'inscription : 17/11/2019

LIST_VIEW & SWITCH Empty
MessageSujet: re   LIST_VIEW & SWITCH EmptyMar 26 Nov 2019 - 20:51

Désolé JL35 on s'est croisé...
Revenir en haut Aller en bas
JL35




Nombre de messages : 7095
Localisation : 77
Date d'inscription : 29/11/2007

LIST_VIEW & SWITCH Empty
MessageSujet: Re: LIST_VIEW & SWITCH   LIST_VIEW & SWITCH EmptyMar 26 Nov 2019 - 20:54

Et on s'est recroisés GERYAN...
Allez, bonne soirée quand même ! Very Happy
Revenir en haut Aller en bas
GERYAN

GERYAN


Nombre de messages : 10
Date d'inscription : 17/11/2019

LIST_VIEW & SWITCH Empty
MessageSujet: re   LIST_VIEW & SWITCH EmptyMar 26 Nov 2019 - 20:58

Bonne soirée à vous JL35.
Revenir en haut Aller en bas
JL35




Nombre de messages : 7095
Localisation : 77
Date d'inscription : 29/11/2007

LIST_VIEW & SWITCH Empty
MessageSujet: Re: LIST_VIEW & SWITCH   LIST_VIEW & SWITCH EmptyMar 26 Nov 2019 - 22:33

Eh, je viens de regarder de plus près, le mot-clé exact est SWITCH1 et non SWITCH tout court.
Avec la syntaxe SWITCH1 n, qui affiche un objet switch à l'écran, en forme d'interrupteur qui bascule
quand on clique dessus, ça marche sous Windows. Marrant et... intéressant !

Par contre LIST_VIEW n'est pas reconnu.
Revenir en haut Aller en bas
Oscaribout




Nombre de messages : 471
Date d'inscription : 29/12/2016

LIST_VIEW & SWITCH Empty
MessageSujet: Re: LIST_VIEW & SWITCH   LIST_VIEW & SWITCH EmptyMar 26 Nov 2019 - 22:59

Il faut regarder dans Panoramic et les Apk, la 1ère page. List_view est en rapport avec open_dialog qui n'existerai pas sous android.
Revenir en haut Aller en bas
Jack
Admin
Jack


Nombre de messages : 2386
Date d'inscription : 28/05/2007

LIST_VIEW & SWITCH Empty
MessageSujet: Re: LIST_VIEW & SWITCH   LIST_VIEW & SWITCH EmptyMer 27 Nov 2019 - 8:55

LIST_VIEW et SWITCH sont deux objets spécifiques à Android.
Ils ne sont pas terminés, c'est pourquoi ils ne sont pas encore documentés.

SWITCH est cependant utilisable et se comporte un peu comme OPTION ou CHECK sous Windows, mais sous forme d'une barre avec un curseur qu'on amène manuellement (avec le doigt sur l'écran tactile de la tablette ou du smartphone) à l'une ou l'autre d'une des extrémités de cette barre.

_________________
LIST_VIEW & SWITCH Webdav username : panoramic@jack-panoramic password : panoramic123
Revenir en haut Aller en bas
https://panoramic.1fr1.net
JL35




Nombre de messages : 7095
Localisation : 77
Date d'inscription : 29/11/2007

LIST_VIEW & SWITCH Empty
MessageSujet: Re: LIST_VIEW & SWITCH   LIST_VIEW & SWITCH EmptyMer 27 Nov 2019 - 15:03

Je orécise: je ne parle que de Panoramic sous Windows (je ne m'intéresse pas à androïd).
Le mot_clé SWITCH1, avec un 1 au bout, est bien reconnu par l'éditeur et traité à l'exécution:
Code:
LABEL clic
SWITCH1 1: LEFT 1,20: ON_CLICK 1,clic
ALPHA 2: TOP 2,60: FONT_SIZE 2,12: FONT_BOLD 2: CAPTION 2,"État = 1"
END

clic:
  CAPTION 2,"État = "+ STR$(CHECKED(1)): ' état 0 ou 1
RETURN
Revenir en haut Aller en bas
jjn4

jjn4


Nombre de messages : 2709
Date d'inscription : 13/09/2009

LIST_VIEW & SWITCH Empty
MessageSujet: +++   LIST_VIEW & SWITCH EmptyMer 27 Nov 2019 - 16:23

Ah oui, c'est vrai, switch1, ça existe, je l'avais oublié, celui-là !
Embarassed
Revenir en haut Aller en bas
http://jjn4.e-monsite.com
JL35




Nombre de messages : 7095
Localisation : 77
Date d'inscription : 29/11/2007

LIST_VIEW & SWITCH Empty
MessageSujet: Re: LIST_VIEW & SWITCH   LIST_VIEW & SWITCH EmptyJeu 28 Nov 2019 - 22:32

C'est marrant ce SWITCH1
Code:
DIM x,y
LABEL Clk
BORDER_SMALL 0: WIDTH 0,150: HEIGHT 0,240
  CAPTION 0,"Lumière !"
PICTURE 1: FULL_SPACE 1: 2D_TARGET_IS 1
COLOR 1,180,255,255
2D_FILL_COLOR 255,255,255: 2D_ELLIPSE 50,80,100,160
2D_FILL_COLOR 64,64,64: 2D_RECTANGLE 55,50,95,90
2D_RECTANGLE 73,0,77,50
SWITCH1 2: TOP 2,140: LEFT 2,10: ON_CLICK 2,Clk
x = 75: y = 120
END

Clk:
  IF CHECKED(2) = 1
      2D_FLOOD x,y,255,255,255: 2D_FLOOD 10,10,180,255,255
  ELSE
      2D_FLOOD x,y,128,128,128: 2D_FLOOD 10,10,80,164,164
  END_IF
RETURN
LIST_VIEW & SWITCH Lumi10
Revenir en haut Aller en bas
jjn4

jjn4


Nombre de messages : 2709
Date d'inscription : 13/09/2009

LIST_VIEW & SWITCH Empty
MessageSujet: +++   LIST_VIEW & SWITCH EmptyVen 29 Nov 2019 - 14:34

Puis-je me permettre d'y rajouter un détail ?
(pas réjouissant, hélas !)
lol!
Code:
DIM x,y,z
LABEL Clk,compte
BORDER_SMALL 0: WIDTH 0,250: HEIGHT 0,240
  CAPTION 0,"Lumière !"
PICTURE 1: FULL_SPACE 1: 2D_TARGET_IS 1
COLOR 1,180,255,255
2D_FILL_COLOR 255,255,255: 2D_ELLIPSE 50,80,100,160
2D_FILL_COLOR 64,64,64: 2D_RECTANGLE 55,50,95,90
2D_RECTANGLE 73,0,77,50
SWITCH1 2: TOP 2,140: LEFT 2,10: ON_CLICK 2,Clk
x = 75: y = 120 :z=14568
shape 3:shape_rectangle_rounded 3
left 3,150:width 3,80:height 3,180:color 3,0,255,255
alpha 4:left 4,170:top 4,20:color 4,0,255,255
caption 4,"Compteur"+chr$(13)+"électrique"
alpha 5:left 5,175:top 5,120:color 5,0,255,255
timer 6:timer_interval 6,99 :on_timer 6,compte
END
Clk:
  IF CHECKED(2) = 1
      2D_FLOOD x,y,255,255,255: 2D_FLOOD 10,10,180,255,255
      timer_on 6:color 3,0,255,255:color 4,0,255,255:color 5,0,255,255
      CAPTION 0,"Lumière !"
  ELSE
      2D_FLOOD x,y,128,128,128: 2D_FLOOD 10,10,80,164,164
      timer_off 6:color 3,0,0,255:color 4,0,0,255:color 5,0,0,255
      caption 0,"Dodo !"
  END_IF
RETURN
compte:
   z=z+1:caption 5,z
return
Jour Laughing Nuit Suspect Jour Laughing Nuit Suspect ...
affraid
Je crois qu'il va falloir songer à mettre des LED...!
Laughing
Revenir en haut Aller en bas
http://jjn4.e-monsite.com
JL35




Nombre de messages : 7095
Localisation : 77
Date d'inscription : 29/11/2007

LIST_VIEW & SWITCH Empty
MessageSujet: Re: LIST_VIEW & SWITCH   LIST_VIEW & SWITCH EmptyVen 29 Nov 2019 - 19:54

dans notre série 'les compteurs'...
Revenir en haut Aller en bas
papydall

papydall


Nombre de messages : 7009
Age : 73
Localisation : Moknine (Tunisie) Entre la chaise et le clavier
Date d'inscription : 03/03/2012

LIST_VIEW & SWITCH Empty
MessageSujet: Re: LIST_VIEW & SWITCH   LIST_VIEW & SWITCH EmptySam 30 Nov 2019 - 1:16

Jl35 a écrit:
C'est marrant ce SWITCH1  king
 

jjn4 a écrit:
Puis-je me permettre d'y rajouter un détail ?  alien
(pas réjouissant, hélas !)

Et voici mon grain de sel ! bounce


Code:

rem ============================================================================
rem                  Idée marrante de JL35
rem              Détail de JJN4 alias le Martien
rem                 Grain de sel de Papydall
rem ============================================================================
DIM x,y,h(7),i,p
LABEL Clk
BORDER_SMALL 0 : WIDTH 0,600 : HEIGHT 0,250
CAPTION 0,"Lumière !"
PICTURE 1 : FULL_SPACE 1 : 2D_TARGET_IS 1 : COLOR 1,180,255,255
2D_FILL_COLOR 255,255,255 : 2D_ELLIPSE 50,80,100,160
2D_FILL_COLOR 64,64,64 : 2D_RECTANGLE 55,50,95,90
2D_RECTANGLE 73,0,77,50
SWITCH1 2 : TOP 2,140 : LEFT 2,10 : width 2,30 : caption 2,"ON|OFF" : ON_CLICK 2,Clk
x = 75 : y = 120 : h(1) = 1
p = 50  : ' <---- Adapter la pause selon la puissance de votre lampe
shape 3 : shape_rectangle_rounded 3
left 3,120 : width 3,440 : height 3,180 : color 3,0,255,255
alpha 4 : left 4,240 : top 4,20 : color 4,0,255,255 : font_name 4,"arial black"
font_size 4,12 : caption 4,"Compteur électrique"
for i = 10 to 16
    digit1 i : top i,50 : left i, 130+(i-10)*60
next i
Compteur()
END
rem ============================================================================
Clk:
  IF CHECKED(2) = 1
      2D_FLOOD x,y,255,255,255 : 2D_FLOOD 10,10,180,255,255
      color 3,0,255,255 : color 4,0,255,255
      CAPTION 0,"Lumière !"
      Compteur()
  ELSE
      2D_FLOOD x,y,128,128,128 : 2D_FLOOD 10,10,80,164,164
      color 3,100,50,10 : color 4,100,50,10 : font_color 4,10,50,100
      caption 0,"Dodo !"
  END_IF
RETURN
rem ============================================================================
SUB Compteur()  
    while CHECKED(2) = 1
        h(1) = h(1) + 1 : caption 16,h(1)        
        if h(1) > 9
           h(1) = 0 : h(2) = h(2) + 1
           caption 16,h(1) : caption 15,h(2)
        end_if
        if h(2) > 9
           h(2) = 0 : h(3) = h(3) + 1
           caption 16,h(1) : caption 15,h(2) : caption 14,h(3)  
        end_if
        if h(3) > 9
           h(3) = 0 : h(4) = h(4) + 1
           caption 16,h(1) : caption 15,h(2) : caption 14,h(3) : caption 13,h(4)
        end_if
        if h(4) > 9
           h(4) = 0 : h(5) = h(5) + 1
           caption 16,h(1) : caption 15,h(2) : caption 14,h(3) : caption 13,h(4)
           caption 12,h(5)
        end_if
        if h(5) > 9
           h(5) = 0 : h(6) = h(6) + 1
           caption 16,h(1) : caption 15,h(2) : caption 14,h(3) : caption 13,h(4)
           caption 12,h(5) : caption 11,h(6)
        end_if
        if h(6) > 9
           h(6) = 0
           for i = 1 to 7 : h(i) = 0 : next i
           caption 16,h(1) : caption 15,h(2) : caption 14,h(3) : caption 13,h(4)
           caption 12,h(5) : caption 11,h(6) : caption 10,h(7)
        end_if
        pause p
    end_while
END_SUB
rem ============================================================================
Revenir en haut Aller en bas
http://papydall-panoramic.forumarabia.com/
JL35




Nombre de messages : 7095
Localisation : 77
Date d'inscription : 29/11/2007

LIST_VIEW & SWITCH Empty
MessageSujet: Re: LIST_VIEW & SWITCH   LIST_VIEW & SWITCH EmptySam 30 Nov 2019 - 19:20

ouais, pas mal papydall !
Revenir en haut Aller en bas
jjn4

jjn4


Nombre de messages : 2709
Date d'inscription : 13/09/2009

LIST_VIEW & SWITCH Empty
MessageSujet: +++   LIST_VIEW & SWITCH EmptySam 30 Nov 2019 - 19:27

Ah oui, avec des digits, c'est plus beau !
Allez, j'y mets une nouvelle touche personnelle
(ça va mettre un peu d'ambiance avec ceux qui n'apprécient pas).
Laughing
Code:
rem ============================================================================
rem                  Idée marrante de JL35
rem              Détail de JJN4 alias le Martien
rem                Grain de sel de Papydall
rem ============================================================================
DIM x,y,h(7),i,p
LABEL Clk
BORDER_SMALL 0 : WIDTH 0,600 : HEIGHT 0,250
CAPTION 0,"Lumière !"
PICTURE 1 : FULL_SPACE 1 : 2D_TARGET_IS 1 : COLOR 1,180,255,255
2D_FILL_COLOR 255,255,255 : 2D_ELLIPSE 50,80,100,160
2D_FILL_COLOR 64,64,64 : 2D_RECTANGLE 55,50,95,90
2D_RECTANGLE 73,0,77,50
SWITCH1 2 : TOP 2,140 : LEFT 2,10 : width 2,30 : caption 2,"ON|OFF" : ON_CLICK 2,Clk
x = 75 : y = 120 : h(1) = 1
p = 50  : ' <---- Adapter la pause selon la puissance de votre lampe
shape 3 : shape_rectangle_rounded 3
left 3,120 : width 3,440 : height 3,180 : color 3,0,255,255
alpha 4 : left 4,240 : top 4,20 : color 4,0,255,255 : font_name 4,"arial black"
font_size 4,12 : caption 4,"Compteur électrique"
for i = 10 to 16
    digit1 i : top i,50 : left i, 130+(i-10)*60
next i
alpha 5:left 5,300:top 5,145:font_bold 5:font_size 5,16
color 5,0,255,255:caption 5,"LINKY"
Compteur()
END
rem ============================================================================
Clk:
  IF CHECKED(2) = 1
      2D_FLOOD x,y,255,255,255 : 2D_FLOOD 10,10,180,255,255
      color 3,0,255,255 : color 4,0,255,255
      CAPTION 0,"Lumière !" : color 5,0,255,255
      Compteur()
  ELSE
      2D_FLOOD x,y,128,128,128 : 2D_FLOOD 10,10,80,164,164
      color 3,100,50,10 : color 4,100,50,10 : font_color 4,10,50,100
      caption 0,"Dodo !" : color 5,100,50,10
  END_IF
RETURN
rem ============================================================================
SUB Compteur() 
    while CHECKED(2) = 1
        h(1) = h(1) + 1 : caption 16,h(1)       
        if h(1) > 9
          h(1) = 0 : h(2) = h(2) + 1
          caption 16,h(1) : caption 15,h(2)
        end_if
        if h(2) > 9
          h(2) = 0 : h(3) = h(3) + 1
          caption 16,h(1) : caption 15,h(2) : caption 14,h(3) 
        end_if
        if h(3) > 9
          h(3) = 0 : h(4) = h(4) + 1
          caption 16,h(1) : caption 15,h(2) : caption 14,h(3) : caption 13,h(4)
        end_if
        if h(4) > 9
          h(4) = 0 : h(5) = h(5) + 1
          caption 16,h(1) : caption 15,h(2) : caption 14,h(3) : caption 13,h(4)
          caption 12,h(5)
        end_if
        if h(5) > 9
          h(5) = 0 : h(6) = h(6) + 1
          caption 16,h(1) : caption 15,h(2) : caption 14,h(3) : caption 13,h(4)
          caption 12,h(5) : caption 11,h(6)
        end_if
        if h(6) > 9
          h(6) = 0
          for i = 1 to 7 : h(i) = 0 : next i
          caption 16,h(1) : caption 15,h(2) : caption 14,h(3) : caption 13,h(4)
          caption 12,h(5) : caption 11,h(6) : caption 10,h(7)
        end_if
        pause p
    end_while
END_SUB
rem ============================================================================
Ca va devenir un programme très collectif !
Qui dit mieux !
lol!
Revenir en haut Aller en bas
http://jjn4.e-monsite.com
JL35




Nombre de messages : 7095
Localisation : 77
Date d'inscription : 29/11/2007

LIST_VIEW & SWITCH Empty
MessageSujet: Re: LIST_VIEW & SWITCH   LIST_VIEW & SWITCH EmptySam 30 Nov 2019 - 21:04

Publicité non payée ? Very Happy
Revenir en haut Aller en bas
papydall

papydall


Nombre de messages : 7009
Age : 73
Localisation : Moknine (Tunisie) Entre la chaise et le clavier
Date d'inscription : 03/03/2012

LIST_VIEW & SWITCH Empty
MessageSujet: Re: LIST_VIEW & SWITCH   LIST_VIEW & SWITCH EmptySam 30 Nov 2019 - 23:59

jjn4 a écrit:
Ca va devenir un programme très collectif !
Qui dit mieux !

Bon, je fais de mon mieux.
Je cite un Martien qui se reconnait :  «  (ça va mettre un peu d'ambiance avec ceux qui n'apprécient pas). »

Tout d’abord, téléchargez cette image et enregistrez-la dans le même dossier que celui du code en-dessous sous ampoule.jpg ou machin-truc.jpg

Ensuite, adaptez la ligne 28
Code:

file_load 6,"ampoule.jpg" : ' <---- Adapter le chemin


Ampoule.jpg:


Code:

rem ============================================================================
rem                  Idée marrante de JL35
rem              Détail de JJN4 alias le Martien
rem                Grain de sel de Papydall
rem ============================================================================
DIM x,y,h(7),i,p,t$
LABEL Clk
BORDER_SMALL 0 : WIDTH 0,900 : HEIGHT 0,750
CAPTION 0,"Lumière !"
PICTURE 1 : width 1,600 : height 1,250 : 2D_TARGET_IS 1 : COLOR 1,180,255,255

2D_FILL_COLOR 255,255,255 : 2D_ELLIPSE 50,80,100,160
2D_FILL_COLOR 64,64,64 : 2D_RECTANGLE 55,50,95,90
2D_RECTANGLE 73,0,77,50
SWITCH1 2 : TOP 2,140 : LEFT 2,10 : width 2,30 : caption 2,"ON|OFF" : ON_CLICK 2,Clk
x = 75 : y = 120 : h(1) = 1
p = 50  : ' <---- Adapter la pause selon la puissance de votre lampe
shape 3 : shape_rectangle_rounded 3
left 3,120 : width 3,440 : height 3,180 : color 3,0,255,255
alpha 4 : left 4,240 : top 4,20 : color 4,0,255,255 : font_name 4,"arial black"
font_size 4,12 : caption 4,"Compteur électrique"
for i = 10 to 16
    digit1 i : top i,50 : left i, 130+(i-10)*60
next i
alpha 5:left 5,300:top 5,145:font_bold 5:font_size 5,16
color 5,0,255,255:caption 5,"LINKY"
picture 6 : width 6,900 : height 6,450 : top 6,260
file_load 6,"ampoule.jpg" : ' <---- Adapter le chemin
alpha 7 : top 7,50 : left 7,620 : font_name 7,"arial black": font_size 7,12
t$ = "La puissance des ampoules," + chr$(13)
t$ = t$ + "se mesure en Lumens," + chr$(13)
t$ = t$ + "tandis que la consommation" + chr$(13)
t$ = t$ + "se mesure en Watt."
caption 7,t$

Compteur()
END
rem ============================================================================
Clk:
  IF CHECKED(2) = 1
      2D_FLOOD x,y,255,255,255 : 2D_FLOOD 10,10,180,255,255
      color 3,0,255,255 : color 4,0,255,255
      CAPTION 0,"Lumière !" : color 5,0,255,255
      Compteur()
  ELSE
      2D_FLOOD x,y,128,128,128 : 2D_FLOOD 10,10,80,164,164
      color 3,100,50,10 : color 4,100,50,10 : font_color 4,10,50,100
      caption 0,"Dodo !" : color 5,100,50,10
  END_IF
RETURN
rem ============================================================================
SUB Compteur()
    while CHECKED(2) = 1
        h(1) = h(1) + 1 : caption 16,h(1)      
        if h(1) > 9
          h(1) = 0 : h(2) = h(2) + 1
          caption 16,h(1) : caption 15,h(2)
        end_if
        if h(2) > 9
          h(2) = 0 : h(3) = h(3) + 1
          caption 16,h(1) : caption 15,h(2) : caption 14,h(3)
        end_if
        if h(3) > 9
          h(3) = 0 : h(4) = h(4) + 1
          caption 16,h(1) : caption 15,h(2) : caption 14,h(3) : caption 13,h(4)
        end_if
        if h(4) > 9
          h(4) = 0 : h(5) = h(5) + 1
          caption 16,h(1) : caption 15,h(2) : caption 14,h(3) : caption 13,h(4)
          caption 12,h(5)
        end_if
        if h(5) > 9
          h(5) = 0 : h(6) = h(6) + 1
          caption 16,h(1) : caption 15,h(2) : caption 14,h(3) : caption 13,h(4)
          caption 12,h(5) : caption 11,h(6)
        end_if
        if h(6) > 9
          h(6) = 0
          for i = 1 to 7 : h(i) = 0 : next i
          caption 16,h(1) : caption 15,h(2) : caption 14,h(3) : caption 13,h(4)
          caption 12,h(5) : caption 11,h(6) : caption 10,h(7)
        end_if
        pause p
    end_while
END_SUB
rem ============================================================================


Résultat:


A-propos, quel est le sujet de cette rubrique ?
Ah, oui, c’est une question posée par GERYAN : « Y a t il une doc quelque part pour les objets LIST_VIEW et SWITCH ? »
Et on est arrivé à parler d’électricité, d’ampoules, d’interrupteur et de tout le bazar qui va avec.
Décidemment, on a tout vu sur ce forum et c’est TANT MIEUX !
Avec toutes mes excuses  pour GERYAN sur le hors-sujet ! Embarassed
Revenir en haut Aller en bas
http://papydall-panoramic.forumarabia.com/
GERYAN

GERYAN


Nombre de messages : 10
Date d'inscription : 17/11/2019

LIST_VIEW & SWITCH Empty
MessageSujet: re   LIST_VIEW & SWITCH EmptyDim 1 Déc 2019 - 1:55

silent
Revenir en haut Aller en bas
jjn4

jjn4


Nombre de messages : 2709
Date d'inscription : 13/09/2009

LIST_VIEW & SWITCH Empty
MessageSujet: +++   LIST_VIEW & SWITCH EmptyDim 1 Déc 2019 - 14:25

C'est vrai qu'on a dérivé d'un sujet « A l'aide »
vers un projet de parfait « inutilitaire ».
Au point que Geryan en est coit ( silent ) !
( Il est quoi...? Laughing )
Bon, mais ça prouve que le forum est vivant !
lol!
Revenir en haut Aller en bas
http://jjn4.e-monsite.com
GERYAN

GERYAN


Nombre de messages : 10
Date d'inscription : 17/11/2019

LIST_VIEW & SWITCH Empty
MessageSujet: re   LIST_VIEW & SWITCH EmptyMar 3 Déc 2019 - 1:58

Après quelques recherches sur l'objet LIST_VIEW serait en fait un container défilant de container
ou un container de container défilant... mais des container type panel sans bordure, voir invisible mais pas cachés
vous suivez le truc... scratch

Bref la logique serait d'avoir

LIST_VIEW 1
Panel 2 : parent 2,1
Panel 3 : parent 3,1
Panel 4 : parent 4,1
Revenir en haut Aller en bas
Contenu sponsorisé





LIST_VIEW & SWITCH Empty
MessageSujet: Re: LIST_VIEW & SWITCH   LIST_VIEW & SWITCH Empty

Revenir en haut Aller en bas
 
LIST_VIEW & SWITCH
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» ListView a new Objekt ?

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC :: PANORAMIC :: A l'aide!-
Sauter vers: