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
» demande explication KGF pour imprimer en mm
Ma Glycemie Emptypar lepetitmarocain Aujourd'hui à 12:55

» Petit passage furtif
Ma Glycemie Emptypar Froggy One Hier à 14:26

» SPIN et aide langage (résolu)
Ma Glycemie Emptypar leclode Sam 23 Mar 2024 - 15:20

» Aide-mémoire des mots-clés Panoramic
Ma Glycemie Emptypar papydall Mer 20 Mar 2024 - 21:23

» Je ne comprend pas pourquoi la largeur de la scene 3d change
Ma Glycemie Emptypar Marc Mar 12 Mar 2024 - 20:06

» Comment télécharger panoramic?
Ma Glycemie Emptypar lepetitmarocain Sam 9 Mar 2024 - 13:31

» @lepetitmarocain <==> KGFGrid
Ma Glycemie Emptypar Klaus Dim 3 Mar 2024 - 9:59

» Tangram-Toukaré
Ma Glycemie Emptypar jjn4 Mer 28 Fév 2024 - 18:12

» Editeur EliP 6 : Le Tiny éditeur avec 25 onglets de travail
Ma Glycemie Emptypar jjn4 Mer 28 Fév 2024 - 18:09

» KGF_dll - nouvelles versions
Ma Glycemie Emptypar Klaus Mer 28 Fév 2024 - 17:01

» Mes souhaits d'amélioration de Panoramic.
Ma Glycemie Emptypar Pedro Lun 26 Fév 2024 - 18:12

» Testez-votre-QI
Ma Glycemie Emptypar jjn4 Dim 25 Fév 2024 - 17:12

» Utilisation d'Élip
Ma Glycemie Emptypar jjn4 Sam 24 Fév 2024 - 18:33

» Récapitulatif ludothèque panoramic jjn4
Ma Glycemie Emptypar jjn4 Sam 24 Fév 2024 - 18:11

» Générateur de mots de passe
Ma Glycemie Emptypar mindstorm Mar 20 Fév 2024 - 20:09

Navigation
 Portail
 Index
 Membres
 Profil
 FAQ
 Rechercher
Rechercher
 
 

Résultats par :
 
Rechercher Recherche avancée
Mars 2024
LunMarMerJeuVenSamDim
    123
45678910
11121314151617
18192021222324
25262728293031
CalendrierCalendrier
-29%
Le deal à ne pas rater :
PC portable Gamer ERAZER DEPUTY P60 – 15,6” FHD 144Hz – i7-12è ...
999.99 € 1399.99 €
Voir le deal

 

 Ma Glycemie

Aller en bas 
AuteurMessage
Yannick




Nombre de messages : 8610
Age : 52
Localisation : Bretagne
Date d'inscription : 15/02/2010

Ma Glycemie Empty
MessageSujet: Ma Glycemie   Ma Glycemie EmptyLun 12 Jan 2015 - 19:26

Je suis en train de faire un petit utilitaire pour ma belle maman et son diabète
et je vous livre mes débuts.
Non pas que ce soit un projet abouti mais j' y ai mis un nouveau type de menu maison.
( pour ce qui sont curieux, les images sont sur mon webdav MaGlycemie_buttons.zip )


Code:
Dim no%,i%,ns%,sc2%,Tim%,pan%(7)
Dim Dr%
Dim Inf%
Dim Pharm%
Dim PanEtat%(7)
Label Detect,Clic_menu


' Form 0
height 0,600 : Width 0,400
top 0,(screen_y-height(0))/2 : left 0,(screen_x-width(0))/2
Color 0,255,255,255 :Caption 0,"Ma Glycémie" :Font_name 0,"arial"

' Panels
for i%=1 to 7
  no%=no%+1 : Pan%(i%)=no%
  Panel no% : height no%,height(0)-38 : width no%,width(0)-16 : top no%,height(no%)*-1
  color no%,255,255,255 :font_name no%,"Times new roman" : Font_size no%,10
next i%

' --Panel 1
' --Panel 2
' --Panel 3
' --Panel 4

' --Panel 5
no%=no%+1
Alpha no% : Parent no%,pan%(5) : top no%,52 : left no%,10 : caption no%,"Dr :"
font_color no%,145,0,10 : font_bold no%

no%=no%+1 : Dr%=no%
Edit no%  : Parent no%,pan%(5) : top no%,67 : left no%,10 : width no%,300
color no%,250,250,200 : font_bold no%

' --Panel 6
no%=no%+1
Alpha no% : Parent no%,pan%(6) : top no%,52 : left no%,10 : caption no%,"Infirmier (e) :"
font_color no%,145,0,10 : font_bold no%

no%=no%+1 : inf%=no%
Edit no%  : Parent no%,pan%(6) : top no%,67 : left no%,10 : width no%,300
color no%,250,250,200 : font_bold no%

' --Panel 7
no%=no%+1
Alpha no% : Parent no%,pan%(7) : top no%,52 : left no%,10 : caption no%,"Pharmacie :"
font_color no%,145,0,10 : font_bold no%

no%=no%+1 : Pharm%=no%
Edit no%  : Parent no%,pan%(7) : top no%,67 : left no%,10 : width no%,300
color no%,250,250,200 : font_bold no%

' Scene2d support du menu
no%=no%+1 : sc2%=no%
scene2d no% : height no%,32 : width no%,width(0)-16 : color no%,230,230,230
on_click no%,Clic_menu

' Sprite menu
for i%=1 to 7
  sprite i% : sprite_file_load i%,str$(i%)+".bmp": sprite_x_position i%,(i%*32)-32
next i%




' Timer
no%=no%+1 : Tim%=no%
Timer no% : Timer_interval no%,100 : on_timer no%,Detect

end


Detect:
  FindMenuButton()
return

Clic_menu:
  Off_click sc2%
  if Menu%>0 and Menu%<8
    for i%= 1 to 7
        if PanEtat%(i%)=1
          ShowHidePanel(i%)
        end_if
    next i%
    ShowHidePanel(Menu%)
  end_if
  On_click sc2%,Clic_menu
return

Sub FindMenuButton()
  dim_local p1%,p2%,x%
  if variable("Menu%")=0 then dim Menu%
  p1%=mouse_x_position(sc2%)
  p2%=mouse_y_position(sc2%)
  for x%=0 to (7*32) step 32
      if p1%<x% and p2%<30
        Menu%=x%/30
        cursor_point sc2%
        Select Menu%
            case 1 : caption 0,"Ma Glycémie [ Ajouter une glycémie ]"
            case 2 : caption 0,"Ma Glycémie [ Journal ]"
            case 3 : caption 0,"Ma Glycémie [ Graphique 12 mois ]"
            case 4 : caption 0,"Ma Glycémie [ Prescriptions ]"
            case 5 : caption 0,"Ma Glycémie [ Docteur ]"
            case 6 : caption 0,"Ma Glycémie [ Infirmière ]"
            case 7 : caption 0,"Ma Glycémie [ Pharmacie ]"
        end_select
        exit_for
      else
        caption 0,"Ma Glycémie"
        cursor_default sc2%
      end_if
  next x%
End_sub


Sub ShowHidePanel(pn%)
  timer_off tim%
  dim_local x%
  if PanEtat%(pn%)=0
      PanEtat%(pn%)=1
      for x%=1 to height(Pan%(pn%))
        top pan%(pn%),top(pan%(pn%))+1
        display
      next x%
  else
      PanEtat%(pn%)=0
      for x%=1 to height(Pan%(pn%))
        top pan%(pn%),top(pan%(pn%))-1
        display
      next x%
  end_if
  timer_on tim%
End_sub

Si cela peut aider ou donner des idées... Laughing
Revenir en haut Aller en bas
 
Ma Glycemie
Revenir en haut 
Page 1 sur 1

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC :: PANORAMIC :: Vos projets-
Sauter vers: