Mai 2024 | Lun | Mar | Mer | Jeu | Ven | Sam | Dim |
---|
| | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | | | Calendrier |
|
| | LIST_VIEW & SWITCH | |
| | Auteur | Message |
---|
GERYAN
Nombre de messages : 10 Date d'inscription : 17/11/2019
| Sujet: LIST_VIEW & SWITCH Mar 26 Nov 2019 - 16:38 | |
| Bonjour Jack Y a t il une doc quelque part pour les objets LIST_VIEW et SWITCH ? | |
| | | jjn4
Nombre de messages : 2709 Date d'inscription : 13/09/2009
| Sujet: +++ Mar 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 ? | |
| | | GERYAN
Nombre de messages : 10 Date d'inscription : 17/11/2019
| Sujet: re Mar 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 | |
| | | JL35
Nombre de messages : 7095 Localisation : 77 Date d'inscription : 29/11/2007
| Sujet: Re: LIST_VIEW & SWITCH Mar 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 | |
| | | GERYAN
Nombre de messages : 10 Date d'inscription : 17/11/2019
| Sujet: re Mar 26 Nov 2019 - 20:51 | |
| Désolé JL35 on s'est croisé... | |
| | | JL35
Nombre de messages : 7095 Localisation : 77 Date d'inscription : 29/11/2007
| Sujet: Re: LIST_VIEW & SWITCH Mar 26 Nov 2019 - 20:54 | |
| Et on s'est recroisés GERYAN... Allez, bonne soirée quand même ! | |
| | | GERYAN
Nombre de messages : 10 Date d'inscription : 17/11/2019
| Sujet: re Mar 26 Nov 2019 - 20:58 | |
| Bonne soirée à vous JL35. | |
| | | JL35
Nombre de messages : 7095 Localisation : 77 Date d'inscription : 29/11/2007
| Sujet: Re: LIST_VIEW & SWITCH Mar 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. | |
| | | Oscaribout
Nombre de messages : 471 Date d'inscription : 29/12/2016
| Sujet: Re: LIST_VIEW & SWITCH Mar 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. | |
| | | Jack Admin
Nombre de messages : 2386 Date d'inscription : 28/05/2007
| Sujet: Re: LIST_VIEW & SWITCH Mer 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. _________________ username : panoramic@jack-panoramic password : panoramic123 | |
| | | JL35
Nombre de messages : 7095 Localisation : 77 Date d'inscription : 29/11/2007
| Sujet: Re: LIST_VIEW & SWITCH Mer 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 | |
| | | jjn4
Nombre de messages : 2709 Date d'inscription : 13/09/2009
| Sujet: +++ Mer 27 Nov 2019 - 16:23 | |
| Ah oui, c'est vrai, switch1, ça existe, je l'avais oublié, celui-là ! | |
| | | JL35
Nombre de messages : 7095 Localisation : 77 Date d'inscription : 29/11/2007
| Sujet: Re: LIST_VIEW & SWITCH Jeu 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 | |
| | | jjn4
Nombre de messages : 2709 Date d'inscription : 13/09/2009
| Sujet: +++ Ven 29 Nov 2019 - 14:34 | |
| Puis-je me permettre d'y rajouter un détail ? (pas réjouissant, hélas !) - 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 Nuit Jour Nuit ... Je crois qu'il va falloir songer à mettre des LED...! | |
| | | JL35
Nombre de messages : 7095 Localisation : 77 Date d'inscription : 29/11/2007
| Sujet: Re: LIST_VIEW & SWITCH Ven 29 Nov 2019 - 19:54 | |
| dans notre série 'les compteurs'... | |
| | | papydall
Nombre de messages : 7009 Age : 73 Localisation : Moknine (Tunisie) Entre la chaise et le clavier Date d'inscription : 03/03/2012
| Sujet: Re: LIST_VIEW & SWITCH Sam 30 Nov 2019 - 1:16 | |
| - Jl35 a écrit:
- C'est marrant ce SWITCH1
- jjn4 a écrit:
- Puis-je me permettre d'y rajouter un détail ?
(pas réjouissant, hélas !) Et voici mon grain de sel ! - 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 ============================================================================
| |
| | | JL35
Nombre de messages : 7095 Localisation : 77 Date d'inscription : 29/11/2007
| Sujet: Re: LIST_VIEW & SWITCH Sam 30 Nov 2019 - 19:20 | |
| ouais, pas mal papydall ! | |
| | | jjn4
Nombre de messages : 2709 Date d'inscription : 13/09/2009
| Sujet: +++ Sam 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). - 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 ! | |
| | | JL35
Nombre de messages : 7095 Localisation : 77 Date d'inscription : 29/11/2007
| Sujet: Re: LIST_VIEW & SWITCH Sam 30 Nov 2019 - 21:04 | |
| Publicité non payée ? | |
| | | papydall
Nombre de messages : 7009 Age : 73 Localisation : Moknine (Tunisie) Entre la chaise et le clavier Date d'inscription : 03/03/2012
| Sujet: Re: LIST_VIEW & SWITCH Sam 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 ! | |
| | | GERYAN
Nombre de messages : 10 Date d'inscription : 17/11/2019
| Sujet: re Dim 1 Déc 2019 - 1:55 | |
| | |
| | | jjn4
Nombre de messages : 2709 Date d'inscription : 13/09/2009
| Sujet: +++ Dim 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 ( ) ! ( Il est quoi...? ) Bon, mais ça prouve que le forum est vivant ! | |
| | | GERYAN
Nombre de messages : 10 Date d'inscription : 17/11/2019
| Sujet: re Mar 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... Bref la logique serait d'avoir LIST_VIEW 1 Panel 2 : parent 2,1 Panel 3 : parent 3,1 Panel 4 : parent 4,1 | |
| | | Contenu sponsorisé
| Sujet: Re: LIST_VIEW & SWITCH | |
| |
| | | | LIST_VIEW & SWITCH | |
|
Sujets similaires | |
|
| Permission de ce forum: | Vous ne pouvez pas répondre aux sujets dans ce forum
| |
| |
| |