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.
Exemple d'une nouvelle version d'un GRID Emptypar Klaus Aujourd'hui à 1:15

» item_index(résolu)
Exemple d'une nouvelle version d'un GRID Emptypar jjn4 Mar 14 Mai 2024 - 19:38

» Bataille terrestre
Exemple d'une nouvelle version d'un GRID Emptypar jjn4 Lun 13 Mai 2024 - 15:01

» SineCube
Exemple d'une nouvelle version d'un GRID Emptypar Marc Sam 11 Mai 2024 - 12:38

» Editeur EliP 6 : Le Tiny éditeur avec 25 onglets de travail
Exemple d'une nouvelle version d'un GRID Emptypar Marc Sam 11 Mai 2024 - 12:22

» Philharmusique
Exemple d'une nouvelle version d'un GRID Emptypar jjn4 Ven 10 Mai 2024 - 13:58

» PANORAMIC V 1
Exemple d'une nouvelle version d'un GRID Emptypar papydall Jeu 9 Mai 2024 - 3:22

» select intégrés [résolu]
Exemple d'une nouvelle version d'un GRID Emptypar jjn4 Mer 8 Mai 2024 - 17:00

» number_mouse_up
Exemple d'une nouvelle version d'un GRID Emptypar jjn4 Mer 8 Mai 2024 - 11:59

» Aide de PANORAMIC
Exemple d'une nouvelle version d'un GRID Emptypar jjn4 Mer 8 Mai 2024 - 11:16

» trop de fichiers en cours
Exemple d'une nouvelle version d'un GRID Emptypar lepetitmarocain Mer 8 Mai 2024 - 10:43

» Je teste PANORAMIC V 1 beta 1
Exemple d'une nouvelle version d'un GRID Emptypar papydall Mer 8 Mai 2024 - 4:17

» bouton dans autre form que 0(résolu)
Exemple d'une nouvelle version d'un GRID Emptypar leclode Lun 6 Mai 2024 - 13:59

» KGF_dll - nouvelles versions
Exemple d'une nouvelle version d'un GRID Emptypar Klaus Lun 6 Mai 2024 - 11:41

» @Jack
Exemple d'une nouvelle version d'un GRID 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
Le Deal du moment :
Cartes Pokémon : la prochaine extension ...
Voir le deal

 

 Exemple d'une nouvelle version d'un GRID

Aller en bas 
+2
Jean Claude
Klaus
6 participants
Aller à la page : 1, 2, 3  Suivant
AuteurMessage
Klaus

Klaus


Nombre de messages : 12298
Age : 75
Localisation : Ile de France
Date d'inscription : 29/12/2009

Exemple d'une nouvelle version d'un GRID Empty
MessageSujet: Exemple d'une nouvelle version d'un GRID   Exemple d'une nouvelle version d'un GRID EmptySam 7 Avr 2018 - 1:23

Je suis en train de créer un nouvel objet KGFGrid. Il est similaire à un GRID, mais avec d'emblée des caractéristiques plus larges:
- par plages de lignes et/ou de colonnes, on peut choisir:
- hauteur ou largeur des cellules
- nature des données (actuellement, on gère des entiers et des chaînes de caractères, mais il y aura du flottant, du booléen (cases à cocher), des images et des mémos comme données d'une seule cellule !)
- format d'affichage (par une chaîne de caractères décrivant le format)
- cadrage dans la cellule (aucun, en haut à gauche, en haut au milieu, en haut à droite, au milieu à gauche, centré horizontalement et verticalement, au milieu à droite, en bas à gauche, en ba sau milieu, en bas à droite)
- visibilité (eh oui, une vraie invisibilité de lignes et/ou de colonnes, même en plein milieu du tableau, pas juste des lignes de hauteur 1 pixel ou des colonnes de largeur 1 pixel !)

Chaque cellule est cliquable et renvoie un USER_EVENT avec l'identification du KGFGrid (au cas où il y en aurait plusieurs...), le numéro de ligne et le numéro de colonne. Il y aura des lignes, colonnes ou groupes de cellules non réactives - c'est en cours d'écriture (comme les lignes et colonnes fixes d'un GRID Panoramic, mais réalisé sous forme de plages de cellules).

Le tableau est implémenté dans un objet ScrollImage donnant les ascenseurs permettant de déplacer le tableau à volonté. Même décalées, les cellules sont identifiées correctement lors d'un clic, y compris en présence de lignes ou colonnes invisibles !

Voici une première démo, assez complète, avec KGF.dll dans mon WebDav, dossier DLLs:
Code:
' test_KGFGrid.bas

label UserEvent
dim res%, KG%, f1$, Types$(6)
  Types$(0) = "Inconnu (traité comme Integer)"
  Types$(1) = "Chaîne"
  Types$(2) = "Entier"
  Types$(3) = "Flottant"
  Types$(4) = "Booléen"
  Types$(5) = "Image"
  Types$(6) = "Mémo"

dll_on "KGF.dll"

KG% = dll_call2("CreateKGFGrid",handle(0),13)                      : ' ok
res% = dll_call2("SetGlobalKGFGridColors",KG%,hex("FFFF"))         : ' ok
res% = dll_call5("LocateKGFGrid",KG%,10,100,400,300)               : ' ok
res% = dll_call5("SetGlobalKGFGridDimensions",KG%,15,20,50,25)     : ' ok
res% = dll_call4("SetKGFGridRowRangeHeight",KG%,2,4,45)            : ' ok
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,7,10,20)         : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,2,4,2,5,2)          : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,4,2,5,5) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,4,2,5,hex("FF8080")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,2,2,4,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,3,3,2,2,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,3,3,4,4,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,4,4,2,4,hex("8080FF")) : ' ok

res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,2,2,1) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,3,3,2,2,2) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,2,2,3) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,3,3,4) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,3,3,6) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,4,4,7) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,3,3,4,4,8) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,4,4,9) : ' ok
f1$ = "%d €"                                                                
res% = dll_call6("SetKGFGridCellRangeFormat",KG%,2,4,2,5,adr(f1$)) : ' ok

res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,2,4,17)        : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,2,4,0-23)      : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,2,4,123)       : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,4,5,5,0-12)      : ' ok


message "Les lignes 2 et 3 vont disparaître..."
res% = dll_call4("SetKGFGridRowRangeVisible",KG%,2,3,0)            : ' ok
message "Les lignes 2 et 3 on disparu, et vont réapparaître..."
res% = dll_call4("SetKGFGridRowRangeVisible",KG%,2,3,1)            : ' ok

message "Les colonnes 4 et 5 vont disparaître..."
res% = dll_call4("SetKGFGridColumnRangeVisible",KG%,4,5,0)         : ' ok
message "Les lignes 4 et 5 on disparu, et vont réapparaître..."
res% = dll_call4("SetKGFGridColumnRangeVisible",KG%,4,5,1)         : ' ok

on_user_event UserEvent

end

UserEvent:
  UserEvent()
  return
  
sub UserEvent()
  dim_local lig%, col%, id%, type%, res$
  if bin_and(user_event_wparam,hex("FF000000"))<>hex("0C000000") then exit_sub
  if bin_and(user_event_wparam,hex("00FF0000"))<>hex("00010000") then exit_sub
  id% = bin_and(user_event_wparam,hex("0000FFFF"))
  col% = user_event_lparam/65536
  lig% = bin_and(user_event_lparam,hex("0000FFFF"))
  type% = dll_call3("GetKGFGridCellType",KG%,lig%,col%)               : ' ok
  select type%
    case 0: ' Inconnu
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)         : ' ok
      res$ = str$(res%)
    case 1: ' Chaîne
      res$ = string$(255," ")
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(res$)) : ' ok
      res$ = trim$(res$)
    case 2: ' Entier
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)         : ' ok
      res$ = str$(res%)
    ' ...
  end_select
  message "clic dans KGFGrid   ID="+str$(id%)+" en ligne "+str$(lig%)+" colonne "+str$(col%)+chr$(13)+chr$(10)+"Type="+Types$(type%)+"  valeur="+res$
end_sub

Dites-moi ce que vous en pensez. Je développe cela pour mes propres besoins, comme c'était le cas de l'objet FlowChart, mais je pense que ça pourrait intéresser quelques-uns. La gestion de images et mémos dans une cellule pourra donner des possibilités assez sympas. Et il y aura un genre de calcul automatique, loin d'être un Excel complet, mais avec des calculs se faisant automatiquement lors du changement de contenu d'une cellule. Ca, c'est le but final, lorsque l'architecture sera complète. Il y aura l'enregistrement dans un ficher et chargement à partir d'un fichier, et bien d'autres choses encore, comme le choix de la police, taille d'écriture et attributs, par groupes de lignes, colonnes et/ou cellules.

Un dernier mot: ce nouvel objet est entièrement une création personnelle - aucun code tiers n'a été utilisé.

Voici une capture:
Exemple d'une nouvelle version d'un GRID Aa165
Revenir en haut Aller en bas
http://klauspanoramic.comxa.com/index.html
Klaus

Klaus


Nombre de messages : 12298
Age : 75
Localisation : Ile de France
Date d'inscription : 29/12/2009

Exemple d'une nouvelle version d'un GRID Empty
MessageSujet: Re: Exemple d'une nouvelle version d'un GRID   Exemple d'une nouvelle version d'un GRID EmptySam 7 Avr 2018 - 2:27

Et voici, toujours dans le WebDav dossier DLLs, une version qui gère correctement le type de données "chaîne", en plus du type "entier", avec le programme de démo suivant:
Code:
' test_KGFGrid.bas

label UserEvent
dim res%, KG%, f1$, Types$(6), v$
  Types$(0) = "Inconnu (traité comme Integer)"
  Types$(1) = "Chaîne"
  Types$(2) = "Entier"
  Types$(3) = "Flottant"
  Types$(4) = "Booléen"
  Types$(5) = "Image"
  Types$(6) = "Mémo"

dll_on "KGF.dll"

KG% = dll_call2("CreateKGFGrid",handle(0),13)                      : ' ok
res% = dll_call2("SetGlobalKGFGridColors",KG%,hex("FFFF"))        : ' ok
res% = dll_call5("LocateKGFGrid",KG%,10,100,400,300)              : ' ok
res% = dll_call5("SetGlobalKGFGridDimensions",KG%,15,20,50,25)    : ' ok
res% = dll_call4("SetKGFGridRowRangeHeight",KG%,2,4,45)            : ' ok
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,7,10,20)        : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,2,4,2,5,2)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,5,7,2,5,1)          : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,4,2,5,5) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,4,2,5,hex("FF8080")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,2,2,4,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,3,3,2,2,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,3,3,4,4,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,4,4,2,4,hex("8080FF")) : ' ok

res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,2,2,1) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,3,3,2,2,2) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,2,2,3) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,3,3,4) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,3,3,6) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,4,4,7) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,3,3,4,4,8) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,4,4,9) : ' ok
f1$ = "%d €"                                                               
res% = dll_call6("SetKGFGridCellRangeFormat",KG%,2,4,2,5,adr(f1$)) : ' ok

res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,2,4,17)        : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,2,4,0-23)      : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,2,4,123)      : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,4,5,5,0-12)      : ' ok
v$ = "Salut"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,5,5,2,4,adr(v$))  : ' ok
v$ = "les"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,6,6,2,4,adr(v$))  : ' ok
v$ = "copains"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,7,7,2,4,adr(v$))  : ' ok


message "Les lignes 2 et 3 vont disparaître..."
res% = dll_call4("SetKGFGridRowRangeVisible",KG%,2,3,0)            : ' ok
message "Les lignes 2 et 3 on disparu, et vont réapparaître..."
res% = dll_call4("SetKGFGridRowRangeVisible",KG%,2,3,1)            : ' ok

message "Les colonnes 4 et 5 vont disparaître..."
res% = dll_call4("SetKGFGridColumnRangeVisible",KG%,4,5,0)        : ' ok
message "Les lignes 4 et 5 on disparu, et vont réapparaître..."
res% = dll_call4("SetKGFGridColumnRangeVisible",KG%,4,5,1)        : ' ok

on_user_event UserEvent

end

UserEvent:
  UserEvent()
  return
 
sub UserEvent()
  dim_local lig%, col%, id%, type%, res$
  if bin_and(user_event_wparam,hex("FF000000"))<>hex("0C000000") then exit_sub
  if bin_and(user_event_wparam,hex("00FF0000"))<>hex("00010000") then exit_sub
  id% = bin_and(user_event_wparam,hex("0000FFFF"))
  col% = user_event_lparam/65536
  lig% = bin_and(user_event_lparam,hex("0000FFFF"))
  type% = dll_call3("GetKGFGridCellType",KG%,lig%,col%)              : ' ok
  select type%
    case 0: ' Inconnu
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      res$ = str$(res%)
    case 1: ' Chaîne
      res$ = string$(255," ")
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(res$)) : ' ok
      res$ = trim$(res$)
    case 2: ' Entier
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      res$ = str$(res%)
    ' ...
  end_select
  message "clic dans KGFGrid  ID="+str$(id%)+" en ligne "+str$(lig%)+" colonne "+str$(col%)+chr$(13)+chr$(10)+"Type="+Types$(type%)+"  valeur="+res$
end_sub

et une capture, après un clic dans une cellue de type chaîne:
Exemple d'une nouvelle version d'un GRID Aa166
Revenir en haut Aller en bas
http://klauspanoramic.comxa.com/index.html
Klaus

Klaus


Nombre de messages : 12298
Age : 75
Localisation : Ile de France
Date d'inscription : 29/12/2009

Exemple d'une nouvelle version d'un GRID Empty
MessageSujet: Re: Exemple d'une nouvelle version d'un GRID   Exemple d'une nouvelle version d'un GRID EmptySam 7 Avr 2018 - 3:23

Idem, avec gestion de cellules de valeurs flottantes:
Code:
' test_KGFGrid.bas

label UserEvent
dim res%, KG%, f1$, Types$(6), v$, f
  Types$(0) = "Inconnu (traité comme Integer)"
  Types$(1) = "Chaîne"
  Types$(2) = "Entier"
  Types$(3) = "Flottant"
  Types$(4) = "Booléen"
  Types$(5) = "Image"
  Types$(6) = "Mémo"

dll_on "KGF.dll"

KG% = dll_call2("CreateKGFGrid",handle(0),13)                      : ' ok
res% = dll_call2("SetGlobalKGFGridColors",KG%,hex("FFFF"))        : ' ok
res% = dll_call5("LocateKGFGrid",KG%,10,100,400,300)              : ' ok
res% = dll_call5("SetGlobalKGFGridDimensions",KG%,15,20,50,25)    : ' ok
res% = dll_call4("SetKGFGridRowRangeHeight",KG%,2,4,45)            : ' ok
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,7,10,20)        : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,2,4,2,5,2)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,5,7,2,5,1)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,8,8,2,5,3)          : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,4,2,5,5) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,4,2,5,hex("FF8080")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,2,2,4,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,3,3,2,2,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,3,3,4,4,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,4,4,2,4,hex("8080FF")) : ' ok

res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,2,2,1) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,3,3,2,2,2) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,2,2,3) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,3,3,4) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,3,3,6) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,4,4,7) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,3,3,4,4,8) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,4,4,9) : ' ok
f1$ = "%d €"                                                               
res% = dll_call6("SetKGFGridCellRangeFormat",KG%,2,4,2,5,adr(f1$)) : ' ok

res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,2,4,17)        : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,2,4,0-23)      : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,2,4,123)      : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,4,5,5,0-12)      : ' ok
v$ = "Salut"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,5,5,2,4,adr(v$))  : ' ok
v$ = "les"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,6,6,2,4,adr(v$))  : ' ok
v$ = "copains"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,7,7,2,4,adr(v$))  : ' ok
f = pi
res% = dll_call6("SetKGFGridCellRangeValue",KG%,8,8,2,4,adr(f))    : ' ok


message "Les lignes 2 et 3 vont disparaître..."
res% = dll_call4("SetKGFGridRowRangeVisible",KG%,2,3,0)            : ' ok
message "Les lignes 2 et 3 on disparu, et vont réapparaître..."
res% = dll_call4("SetKGFGridRowRangeVisible",KG%,2,3,1)            : ' ok

message "Les colonnes 4 et 5 vont disparaître..."
res% = dll_call4("SetKGFGridColumnRangeVisible",KG%,4,5,0)        : ' ok
message "Les lignes 4 et 5 on disparu, et vont réapparaître..."
res% = dll_call4("SetKGFGridColumnRangeVisible",KG%,4,5,1)        : ' ok

on_user_event UserEvent

end

UserEvent:
  UserEvent()
  return
 
sub UserEvent()
  dim_local lig%, col%, id%, type%, res$, f
  if bin_and(user_event_wparam,hex("FF000000"))<>hex("0C000000") then exit_sub
  if bin_and(user_event_wparam,hex("00FF0000"))<>hex("00010000") then exit_sub
  id% = bin_and(user_event_wparam,hex("0000FFFF"))
  col% = user_event_lparam/65536
  lig% = bin_and(user_event_lparam,hex("0000FFFF"))
  type% = dll_call3("GetKGFGridCellType",KG%,lig%,col%)              : ' ok
  select type%
    case 0: ' Inconnu
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      res$ = str$(res%)
    case 1: ' Chaîne
      res$ = string$(255," ")
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(res$)) : ' ok
      res$ = trim$(res$)
    case 2: ' Entier
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      res$ = str$(res%)
    case 3: ' flottant
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(f))    : ' ok
      res$ = str$(f)
    ' ...
  end_select
  message "clic dans KGFGrid  ID="+str$(id%)+" en ligne "+str$(lig%)+" colonne "+str$(col%)+chr$(13)+chr$(10)+"Type="+Types$(type%)+"  valeur="+res$
end_sub

Et une capture, avec un clic dans une cellu e de valeur flottante:
Exemple d'une nouvelle version d'un GRID Aa167
Les 3 cellules flottantes ont été déclarées en flottant, mais sans format spécifique. Elles sont donc affichées avec arrondi sur deux décimales par défaut (monétaire !), mais toutes les décimales sont mémorisées ce que prouve le clic sur une de ces cellules.
Revenir en haut Aller en bas
http://klauspanoramic.comxa.com/index.html
Klaus

Klaus


Nombre de messages : 12298
Age : 75
Localisation : Ile de France
Date d'inscription : 29/12/2009

Exemple d'une nouvelle version d'un GRID Empty
MessageSujet: Re: Exemple d'une nouvelle version d'un GRID   Exemple d'une nouvelle version d'un GRID EmptySam 7 Avr 2018 - 10:05

Nouvelle version dans le WebDavn dossier DLLs. On gère maintenant le type de cellule "Booléen" en affichant une CheckBox, non cochée pour faux (valeur 0) ou cochée pour vrai (valeur <>0).

Voici le code du programme de démo:
Code:
' test_KGFGrid.bas

label UserEvent
dim res%, KG%, f1$, Types$(6), v$, f
  Types$(0) = "Inconnu (traité comme Integer)"
  Types$(1) = "Chaîne"
  Types$(2) = "Entier"
  Types$(3) = "Flottant"
  Types$(4) = "Booléen"
  Types$(5) = "Image"
  Types$(6) = "Mémo"

dll_on "KGF.dll"

KG% = dll_call2("CreateKGFGrid",handle(0),13)                      : ' ok
res% = dll_call2("SetGlobalKGFGridColors",KG%,hex("FFFF"))        : ' ok
res% = dll_call5("LocateKGFGrid",KG%,10,100,400,300)              : ' ok
res% = dll_call5("SetGlobalKGFGridDimensions",KG%,15,20,50,25)    : ' ok
res% = dll_call4("SetKGFGridRowRangeHeight",KG%,2,4,45)            : ' ok
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,7,10,20)        : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,2,4,2,5,2)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,5,7,2,5,1)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,8,8,2,5,3)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,5,8,6,6,4)          : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,4,2,5,5) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,4,2,5,hex("FF8080")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,2,2,4,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,3,3,2,2,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,3,3,4,4,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,4,4,2,4,hex("8080FF")) : ' ok

res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,2,2,1) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,3,3,2,2,2) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,2,2,3) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,3,3,4) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,3,3,6) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,4,4,7) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,3,3,4,4,8) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,4,4,9) : ' ok
f1$ = "%d €"                                                               
res% = dll_call6("SetKGFGridCellRangeFormat",KG%,2,4,2,5,adr(f1$)) : ' ok

res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,2,4,17)        : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,2,4,0-23)      : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,2,4,123)      : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,4,5,5,0-12)      : ' ok
v$ = "Salut"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,5,5,2,4,adr(v$))  : ' ok
v$ = "les"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,6,6,2,4,adr(v$))  : ' ok
v$ = "copains"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,7,7,2,4,adr(v$))  : ' ok
f = pi
res% = dll_call6("SetKGFGridCellRangeValue",KG%,8,8,2,4,adr(f))    : ' ok


message "Les lignes 2 et 3 vont disparaître..."
res% = dll_call4("SetKGFGridRowRangeVisible",KG%,2,3,0)            : ' ok
message "Les lignes 2 et 3 on disparu, et vont réapparaître..."
res% = dll_call4("SetKGFGridRowRangeVisible",KG%,2,3,1)            : ' ok

message "Les colonnes 4 et 5 vont disparaître..."
res% = dll_call4("SetKGFGridColumnRangeVisible",KG%,4,5,0)        : ' ok
message "Les lignes 4 et 5 on disparu, et vont réapparaître..."
res% = dll_call4("SetKGFGridColumnRangeVisible",KG%,4,5,1)        : ' ok

on_user_event UserEvent

end

UserEvent:
  UserEvent()
  return
 
sub UserEvent()
  dim_local lig%, col%, id%, type%, res$, f
  if bin_and(user_event_wparam,hex("FF000000"))<>hex("0C000000") then exit_sub
  if bin_and(user_event_wparam,hex("00FF0000"))<>hex("00010000") then exit_sub
  id% = bin_and(user_event_wparam,hex("0000FFFF"))
  col% = user_event_lparam/65536
  lig% = bin_and(user_event_lparam,hex("0000FFFF"))
  type% = dll_call3("GetKGFGridCellType",KG%,lig%,col%)              : ' ok
  select type%
    case 0: ' Inconnu
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      res$ = str$(res%)
    case 1: ' Chaîne
      res$ = string$(255," ")
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(res$)) : ' ok
      res$ = trim$(res$)
    case 2: ' Entier
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      res$ = str$(res%)
    case 3: ' flottant
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(f))    : ' ok
      res$ = str$(f)
    case 4: ' Booleen
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      res$ = str$(res%)
    ' ...
  end_select
  message "clic dans KGFGrid  ID="+str$(id%)+" en ligne "+str$(lig%)+" colonne "+str$(col%)+chr$(13)+chr$(10)+"Type="+Types$(type%)+"  valeur="+res$
  if type%=4
    res% = dll_call6("SetKGFGridCellRangeValue",KG%,lig%,lig%,col%,col%,1-res%)        : ' ok
  end_if
end_sub

et une capture d'écran, lors d'un clic sur une de ces cellules dont la case est cochée:
Exemple d'une nouvelle version d'un GRID Aa168
Revenir en haut Aller en bas
http://klauspanoramic.comxa.com/index.html
Jean Claude

Jean Claude


Nombre de messages : 5950
Age : 69
Localisation : 83 Var
Date d'inscription : 07/05/2009

Exemple d'une nouvelle version d'un GRID Empty
MessageSujet: Re: Exemple d'une nouvelle version d'un GRID   Exemple d'une nouvelle version d'un GRID EmptySam 7 Avr 2018 - 11:57

Voilà un outil fort intéressant aux vues des captures d'écran.

Je laisse décanter un peu, avant de tester.

Merci Klaus.
A+

Revenir en haut Aller en bas
Klaus

Klaus


Nombre de messages : 12298
Age : 75
Localisation : Ile de France
Date d'inscription : 29/12/2009

Exemple d'une nouvelle version d'un GRID Empty
MessageSujet: Re: Exemple d'une nouvelle version d'un GRID   Exemple d'une nouvelle version d'un GRID EmptySam 7 Avr 2018 - 12:29

Nouvelle version de KGF.dll avec cet objet dans le WebDav, dossier DLLs.

Maintenant, on gère le type "Image" des cellules. N'importe quelle cellule peut contenir une image (passée par le presse-papier). Elle sera affichée dans la cellule en la remplissant (comme avec STRETCH_ON sur un PICTURE). Mais ses dimensions d'origine sont préservées en interne, et on peut récupérer l'image d'origine.

Voici le programme de démo:
Code:
' test_KGFGrid.bas

label UserEvent
dim res%, KG%, f1$, Types$(6), v$, f, img$
  Types$(0) = "Inconnu (traité comme Integer)"
  Types$(1) = "Chaîne"
  Types$(2) = "Entier"
  Types$(3) = "Flottant"
  Types$(4) = "Booléen"
  Types$(5) = "Image"
  Types$(6) = "Mémo"
  
picture 1 : top 1,100 : left 1,420 : width 1,150 : height 1,150 : stretch_on 1  

dll_on "KGF.dll"

KG% = dll_call2("CreateKGFGrid",handle(0),13)                      : ' ok
res% = dll_call2("SetGlobalKGFGridColors",KG%,hex("FFFF"))         : ' ok
res% = dll_call5("LocateKGFGrid",KG%,10,100,400,300)               : ' ok
res% = dll_call5("SetGlobalKGFGridDimensions",KG%,15,20,50,25)     : ' ok
res% = dll_call4("SetKGFGridRowRangeHeight",KG%,2,4,45)            : ' ok
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,7,10,20)         : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,2,4,2,5,2)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,5,7,2,5,1)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,8,8,2,5,3)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,5,8,6,6,4)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,2,4,6,6,5)          : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,4,2,5,5) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,4,2,5,hex("FF8080")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,2,2,4,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,3,3,2,2,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,3,3,4,4,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,4,4,2,4,hex("8080FF")) : ' ok

res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,2,2,1) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,3,3,2,2,2) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,2,2,3) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,3,3,4) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,3,3,6) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,4,4,7) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,3,3,4,4,8) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,4,4,9) : ' ok
f1$ = "%d €"                                                                
res% = dll_call6("SetKGFGridCellRangeFormat",KG%,2,4,2,5,adr(f1$)) : ' ok

res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,2,4,17)        : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,2,4,0-23)      : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,2,4,123)       : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,4,5,5,0-12)      : ' ok
v$ = "Salut"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,5,5,2,4,adr(v$))   : ' ok
v$ = "les"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,6,6,2,4,adr(v$))   : ' ok
v$ = "copains"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,7,7,2,4,adr(v$))   : ' ok
f = pi
res% = dll_call6("SetKGFGridCellRangeValue",KG%,8,8,2,4,adr(f))    : ' ok

img$ = "Android.bmp"
res% = dll_call1("LoadAnyImageFile",adr(img$))
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,6,6,0)         : ' ok
img$ = "marche_1_1_1_2.jpg"
res% = dll_call1("LoadAnyImageFile",adr(img$))
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,6,6,0)         : ' ok
img$ = "crane.bmp"
res% = dll_call1("LoadAnyImageFile",adr(img$))
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,6,6,0)         : ' ok

message "Les lignes 2 et 3 vont disparaître..."
res% = dll_call4("SetKGFGridRowRangeVisible",KG%,2,3,0)            : ' ok
message "Les lignes 2 et 3 on disparu, et vont réapparaître..."
res% = dll_call4("SetKGFGridRowRangeVisible",KG%,2,3,1)            : ' ok

message "Les colonnes 4 et 5 vont disparaître..."
res% = dll_call4("SetKGFGridColumnRangeVisible",KG%,4,5,0)         : ' ok
message "Les lignes 4 et 5 on disparu, et vont réapparaître..."
res% = dll_call4("SetKGFGridColumnRangeVisible",KG%,4,5,1)         : ' ok

on_user_event UserEvent

end

UserEvent:
  UserEvent()
  return
  
sub UserEvent()
  dim_local lig%, col%, id%, type%, res$, f
  if bin_and(user_event_wparam,hex("FF000000"))<>hex("0C000000") then exit_sub
  if bin_and(user_event_wparam,hex("00FF0000"))<>hex("00010000") then exit_sub
  id% = bin_and(user_event_wparam,hex("0000FFFF"))
  col% = user_event_lparam/65536
  lig% = bin_and(user_event_lparam,hex("0000FFFF"))
  delete 1
  picture 1 : top 1,100 : left 1,420 : width 1,150 : height 1,150 : stretch_on 1
  type% = dll_call3("GetKGFGridCellType",KG%,lig%,col%)               : ' ok
  select type%
    case 0: ' Inconnu
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)         : ' ok
      res$ = str$(res%)
    case 1: ' Chaîne
      res$ = string$(255," ")
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(res$)) : ' ok
      res$ = trim$(res$)
    case 2: ' Entier
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)         : ' ok
      res$ = str$(res%)
    case 3: ' flottant
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(f))    : ' ok
      res$ = str$(f)
    case 4: ' Booleen
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)         : ' ok
      res$ = str$(res%)
    case 5: ' Image
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)         : ' ok
      clipboard_paste 1
     ' ...
  end_select
  message "clic dans KGFGrid   ID="+str$(id%)+" en ligne "+str$(lig%)+" colonne "+str$(col%)+chr$(13)+chr$(10)+"Type="+Types$(type%)+"  valeur="+res$
  if type%=4
    res% = dll_call6("SetKGFGridCellRangeValue",KG%,lig%,lig%,col%,col%,1-res%)        : ' ok
  end_if
end_sub

Voici les 3 images qui sont utilisées dans ce code (libre à vous de mettre les vôtres):
Android.bmp:
Exemple d'une nouvelle version d'un GRID Androi10
marche_1_1_1_2.jpg:
Exemple d'une nouvelle version d'un GRID Marche10:
crane.bmp:
Exemple d'une nouvelle version d'un GRID Crane_10

Et voici une capture, après avoir cliiqué sur le bonhomme qui marche:
Exemple d'une nouvelle version d'un GRID Aa169
Revenir en haut Aller en bas
http://klauspanoramic.comxa.com/index.html
jjn4

jjn4


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

Exemple d'une nouvelle version d'un GRID Empty
MessageSujet: +++   Exemple d'une nouvelle version d'un GRID EmptySam 7 Avr 2018 - 13:27

Ouaaah, impressionnant !
cheers
Revenir en haut Aller en bas
http://jjn4.e-monsite.com
Klaus

Klaus


Nombre de messages : 12298
Age : 75
Localisation : Ile de France
Date d'inscription : 29/12/2009

Exemple d'une nouvelle version d'un GRID Empty
MessageSujet: Re: Exemple d'une nouvelle version d'un GRID   Exemple d'une nouvelle version d'un GRID EmptySam 7 Avr 2018 - 13:31

Nouvelle version de KGF.dll avec cet objet dans le WebDav, dossier DLLs.

On gère maintenant le type "Mémo" pour une cellule. C'est le dernier type de données prévu pour le moment. Une ou plusieurs cellules peuvent être définies comme "memo". Elles seront alors chargées par les données d'un mémo dont un passe le handle, et on peut récupérer le texte complet de ce mémo, à nouveau dans un mémo dont un passe le handle.

Le programme de démo ci-après utilise la cellule ligne 3 colonne 1 comme mémo. Elle sera chargée avec la liste des polices définies sur le système. Un clic dans cette cellule récupère ce texte et l'affiche dans le mémo en haut de la page.
Code:
' test_KGFGrid.bas

label UserEvent
dim res%, KG%, f1$, Types$(6), v$, f, img$
  Types$(0) = "Inconnu (traité comme Integer)"
  Types$(1) = "Chaîne"
  Types$(2) = "Entier"
  Types$(3) = "Flottant"
  Types$(4) = "Booléen"
  Types$(5) = "Image"
  Types$(6) = "Mémo"
 
picture 1 : top 1,100 : left 1,420 : width 1,150 : height 1,150 : stretch_on 1 
memo 2 : top 2,10 : left 2,10 : width 2,400 : bar_both 2
dll_on "KGF.dll"

KG% = dll_call2("CreateKGFGrid",handle(0),13)                      : ' ok
res% = dll_call2("SetGlobalKGFGridColors",KG%,hex("FFFF"))        : ' ok
res% = dll_call5("LocateKGFGrid",KG%,10,100,400,300)              : ' ok
res% = dll_call5("SetGlobalKGFGridDimensions",KG%,15,20,50,25)    : ' ok
res% = dll_call4("SetKGFGridRowRangeHeight",KG%,2,4,45)            : ' ok
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,7,10,20)        : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,2,4,2,5,2)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,5,7,2,5,1)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,8,8,2,5,3)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,5,8,6,6,4)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,2,4,6,6,5)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,3,3,1,1,6)          : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,4,2,5,5) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,4,2,5,hex("FF8080")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,2,2,4,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,3,3,2,2,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,3,3,4,4,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,4,4,2,4,hex("8080FF")) : ' ok

res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,2,2,1) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,3,3,2,2,2) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,2,2,3) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,3,3,4) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,3,3,6) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,4,4,7) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,3,3,4,4,8) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,4,4,9) : ' ok
f1$ = "%d €"                                                               
res% = dll_call6("SetKGFGridCellRangeFormat",KG%,2,4,2,5,adr(f1$)) : ' ok

res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,2,4,17)        : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,2,4,0-23)      : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,2,4,123)      : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,4,5,5,0-12)      : ' ok
v$ = "Salut"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,5,5,2,4,adr(v$))  : ' ok
v$ = "les"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,6,6,2,4,adr(v$))  : ' ok
v$ = "copains"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,7,7,2,4,adr(v$))  : ' ok
f = pi
res% = dll_call6("SetKGFGridCellRangeValue",KG%,8,8,2,4,adr(f))    : ' ok

img$ = "Android.bmp"
res% = dll_call1("LoadAnyImageFile",adr(img$))
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,6,6,0)        : ' ok
img$ = "marche_1_1_1_2.jpg"
res% = dll_call1("LoadAnyImageFile",adr(img$))
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,6,6,0)        : ' ok
img$ = "crane.bmp"
res% = dll_call1("LoadAnyImageFile",adr(img$))
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,6,6,0)        : ' ok

font_names_load 2
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,1,1,handle(2)) : ' ok
clear 2

message "Les lignes 2 et 3 vont disparaître..."
res% = dll_call4("SetKGFGridRowRangeVisible",KG%,2,3,0)            : ' ok
message "Les lignes 2 et 3 on disparu, et vont réapparaître..."
res% = dll_call4("SetKGFGridRowRangeVisible",KG%,2,3,1)            : ' ok

message "Les colonnes 4 et 5 vont disparaître..."
res% = dll_call4("SetKGFGridColumnRangeVisible",KG%,4,5,0)        : ' ok
message "Les lignes 4 et 5 on disparu, et vont réapparaître..."
res% = dll_call4("SetKGFGridColumnRangeVisible",KG%,4,5,1)        : ' ok


on_user_event UserEvent

end

UserEvent:
  UserEvent()
  return
 
sub UserEvent()
  dim_local lig%, col%, id%, type%, res$, f
  if bin_and(user_event_wparam,hex("FF000000"))<>hex("0C000000") then exit_sub
  if bin_and(user_event_wparam,hex("00FF0000"))<>hex("00010000") then exit_sub
  id% = bin_and(user_event_wparam,hex("0000FFFF"))
  col% = user_event_lparam/65536
  lig% = bin_and(user_event_lparam,hex("0000FFFF"))
  delete 1
  picture 1 : top 1,100 : left 1,420 : width 1,150 : height 1,150 : stretch_on 1
  clear 2
  type% = dll_call3("GetKGFGridCellType",KG%,lig%,col%)              : ' ok
  select type%
    case 0: ' Inconnu
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      res$ = str$(res%)
    case 1: ' Chaîne
      res$ = string$(255," ")
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(res$)) : ' ok
      res$ = trim$(res$)
    case 2: ' Entier
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      res$ = str$(res%)
    case 3: ' flottant
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(f))    : ' ok
      res$ = str$(f)
    case 4: ' Booleen
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      res$ = str$(res%)
    case 5: ' Image
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      clipboard_paste 1
    case 6: ' Mémo
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,handle(2)) : ' ok
  end_select
  message "clic dans KGFGrid  ID="+str$(id%)+" en ligne "+str$(lig%)+" colonne "+str$(col%)+chr$(13)+chr$(10)+"Type="+Types$(type%)+"  valeur="+res$
  if type%=4
    res% = dll_call6("SetKGFGridCellRangeValue",KG%,lig%,lig%,col%,col%,1-res%)        : ' ok
  end_if
end_sub

Maintenant, je vais entamer le codage du paramétrage des polices, couleur, tailles et attributs des textes.
Revenir en haut Aller en bas
http://klauspanoramic.comxa.com/index.html
Minibug

Minibug


Nombre de messages : 4566
Age : 57
Localisation : Vienne (86)
Date d'inscription : 09/02/2012

Exemple d'une nouvelle version d'un GRID Empty
MessageSujet: Re: Exemple d'une nouvelle version d'un GRID   Exemple d'une nouvelle version d'un GRID EmptySam 7 Avr 2018 - 14:05

Bonjour Klaus !

Ton projet sur le grid et très intéressant. j'entrevois peut être un usage dans GPP. drunken
Je me souvient que tu avais déjà bien avancé sur des fonctions similaires...

Dis moi, crois tu qu'il soit possible d'avoir une fonction qui masque telle ou telle ligne dans le grid,
Ou peut être même un ensemble de lignes ? Je t'explique l'intérêt d'une telle fonction...

Dans mon tableau des propriétés des objets dans GPP j'utilise le grid et chaque ligne correspond à une propriété.
Je voudrai pour la suite de GPP ajouter toutes les propriétés même celles propre à un ou deux objets.
Comme par exemple FULL_SPACE qui n'est utile que sur quelques objets.
Ensuite je crée une table des propriétés sous forme de chaîne de caractère avec 0 ou 1,
et comme cela j'affiche seulement les propriétés à '1' qui sont relatives à l'objet. Celles à '0' resteront cachées.

Voila pourquoi je te demande si cela est possible ? Par contre je n'ai pas d'urgence.
Je travaille sur autre chose dans GPP qui me prends déjà pas mal de temps... Wink
Revenir en haut Aller en bas
http://gpp.panoramic.free.fr
Klaus

Klaus


Nombre de messages : 12298
Age : 75
Localisation : Ile de France
Date d'inscription : 29/12/2009

Exemple d'une nouvelle version d'un GRID Empty
MessageSujet: Re: Exemple d'une nouvelle version d'un GRID   Exemple d'une nouvelle version d'un GRID EmptySam 7 Avr 2018 - 14:07

Nouvelle version de KGF.dll avec cet objet dans le WebDav, dossier DLLs.

Et voici une version qui gère nom, couleur et taille de la police, cellule par cellule, ainsi que les attributs gras, italique, souligné et barré. Voi la version du programme de démo:
Code:
' test_KGFGrid.bas

label UserEvent
dim res%, KG%, f1$, Types$(6), v$, f, img$
  Types$(0) = "Inconnu (traité comme Integer)"
  Types$(1) = "Chaîne"
  Types$(2) = "Entier"
  Types$(3) = "Flottant"
  Types$(4) = "Booléen"
  Types$(5) = "Image"
  Types$(6) = "Mémo"
 
picture 1 : top 1,100 : left 1,420 : width 1,150 : height 1,150 : stretch_on 1 
memo 2 : top 2,10 : left 2,10 : width 2,400 : bar_both 2
dll_on "KGF.dll"

KG% = dll_call2("CreateKGFGrid",handle(0),13)                      : ' ok
res% = dll_call2("SetGlobalKGFGridColors",KG%,hex("FFFF"))        : ' ok
res% = dll_call5("LocateKGFGrid",KG%,10,100,400,300)              : ' ok
res% = dll_call5("SetGlobalKGFGridDimensions",KG%,15,20,50,25)    : ' ok
res% = dll_call4("SetKGFGridRowRangeHeight",KG%,2,4,45)            : ' ok
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,7,10,20)        : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,2,4,2,5,2)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,5,7,2,5,1)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,8,8,2,5,3)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,5,8,6,6,4)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,2,4,6,6,5)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,3,3,1,1,6)          : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,4,2,5,5) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,4,2,5,hex("FF8080")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,2,2,4,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,3,3,2,2,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,3,3,4,4,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,4,4,2,4,hex("8080FF")) : ' ok

res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,2,2,1) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,3,3,2,2,2) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,2,2,3) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,3,3,4) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,3,3,6) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,4,4,7) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,3,3,4,4,8) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,4,4,9) : ' ok
f1$ = "%d €"                                                               
res% = dll_call6("SetKGFGridCellRangeFormat",KG%,2,4,2,5,adr(f1$)) : ' ok

res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,2,4,17)        : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,2,4,0-23)      : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,2,4,123)      : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,4,5,5,0-12)      : ' ok
v$ = "Salut"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,5,5,2,4,adr(v$))  : ' ok
v$ = "les"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,6,6,2,4,adr(v$))  : ' ok
v$ = "copains"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,7,7,2,4,adr(v$))  : ' ok
f = pi
res% = dll_call6("SetKGFGridCellRangeValue",KG%,8,8,2,4,adr(f))    : ' ok

img$ = "Android.bmp"
res% = dll_call1("LoadAnyImageFile",adr(img$))
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,6,6,0)        : ' ok
img$ = "marche_1_1_1_2.jpg"
res% = dll_call1("LoadAnyImageFile",adr(img$))
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,6,6,0)        : ' ok
img$ = "crane.bmp"
res% = dll_call1("LoadAnyImageFile",adr(img$))
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,6,6,0)        : ' ok

font_names_load 2
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,1,1,handle(2)) : ' ok
clear 2

res% = dll_call6("SetKGFGridCellRangeFontBold",KG%,5,5,2,4,1)      : ' ok
res% = dll_call6("SetKGFGridCellRangeFontItalic",KG%,5,5,2,4,1)    : ' ok

v$ = "Arial Black"
res% = dll_call6("SetKGFGridCellRangeFontName",KG%,6,6,2,4,adr(v$)) : ' ok
res% = dll_call6("SetKGFGridCellRangeFontSize",KG%,6,6,2,4,12)    : ' ok

res% = dll_call6("SetKGFGridCellRangeFontColor",KG%,7,7,2,4,hex("FF0000"))  : ' ok

message "Les lignes 2 et 3 vont disparaître..."
res% = dll_call4("SetKGFGridRowRangeVisible",KG%,2,3,0)            : ' ok
message "Les lignes 2 et 3 on disparu, et vont réapparaître..."
res% = dll_call4("SetKGFGridRowRangeVisible",KG%,2,3,1)            : ' ok

message "Les colonnes 4 et 5 vont disparaître..."
res% = dll_call4("SetKGFGridColumnRangeVisible",KG%,4,5,0)        : ' ok
message "Les lignes 4 et 5 on disparu, et vont réapparaître..."
res% = dll_call4("SetKGFGridColumnRangeVisible",KG%,4,5,1)        : ' ok


on_user_event UserEvent

end

UserEvent:
  UserEvent()
  return
 
sub UserEvent()
  dim_local lig%, col%, id%, type%, res$, f
  if bin_and(user_event_wparam,hex("FF000000"))<>hex("0C000000") then exit_sub
  if bin_and(user_event_wparam,hex("00FF0000"))<>hex("00010000") then exit_sub
  id% = bin_and(user_event_wparam,hex("0000FFFF"))
  col% = user_event_lparam/65536
  lig% = bin_and(user_event_lparam,hex("0000FFFF"))
  delete 1
  picture 1 : top 1,100 : left 1,420 : width 1,150 : height 1,150 : stretch_on 1
  clear 2
  type% = dll_call3("GetKGFGridCellType",KG%,lig%,col%)              : ' ok
  select type%
    case 0: ' Inconnu
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      res$ = str$(res%)
    case 1: ' Chaîne
      res$ = string$(255," ")
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(res$)) : ' ok
      res$ = trim$(res$)
    case 2: ' Entier
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      res$ = str$(res%)
    case 3: ' flottant
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(f))    : ' ok
      res$ = str$(f)
    case 4: ' Booleen
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      res$ = str$(res%)
    case 5: ' Image
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      clipboard_paste 1
    case 6: ' Mémo
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,handle(2)) : ' ok
  end_select
  message "clic dans KGFGrid  ID="+str$(id%)+" en ligne "+str$(lig%)+" colonne "+str$(col%)+chr$(13)+chr$(10)+"Type="+Types$(type%)+"  valeur="+res$
  if type%=4
    res% = dll_call6("SetKGFGridCellRangeValue",KG%,lig%,lig%,col%,col%,1-res%)        : ' ok
  end_if
end_sub

et une capture d'écran:
Exemple d'une nouvelle version d'un GRID Aa170

La suite viendra à un rythme plus "calme": des possibilités de calculs automatiques.
Revenir en haut Aller en bas
http://klauspanoramic.comxa.com/index.html
Klaus

Klaus


Nombre de messages : 12298
Age : 75
Localisation : Ile de France
Date d'inscription : 29/12/2009

Exemple d'une nouvelle version d'un GRID Empty
MessageSujet: Re: Exemple d'une nouvelle version d'un GRID   Exemple d'une nouvelle version d'un GRID EmptySam 7 Avr 2018 - 14:11

Citation :
Dis moi, crois tu qu'il soit possible d'avoir une fonction qui masque telle ou telle ligne dans le grid,
Ou peut être même un ensemble de lignes ? Je t'explique l'intérêt d'une telle fonction...
Oui, c'est déjà opérationnel. Fais marcher le programme de démo, et tu verras, pontuées par des messages, la dispatition puis réapparition d'un groupe de lignes, puis idem pour un groupe de colonnes. Il y aune fonction spéciale qui gère un attribut de "visibilité" pour un groupe de lignes ou un groupe de colonnes:
Code:
res% = dll_call4("SetKGFGridRowRangeVisible",KG%,lig1%,lig2%,vis%) 
res% = dll_call4("SetKGFGridColumnRangeVisible",KG%,col1%,col2%,vis%) 
avec vis%=0 pour invisible, et vis%=1 pour visible.
Revenir en haut Aller en bas
http://klauspanoramic.comxa.com/index.html
Minibug

Minibug


Nombre de messages : 4566
Age : 57
Localisation : Vienne (86)
Date d'inscription : 09/02/2012

Exemple d'une nouvelle version d'un GRID Empty
MessageSujet: Re: Exemple d'une nouvelle version d'un GRID   Exemple d'une nouvelle version d'un GRID EmptySam 7 Avr 2018 - 14:18

De plus en plus fort Klaus !!!
Avant même de demander, les fonctions sont déjà réalisées. Alors là BRAVO !

Laughing Laughing Laughing Laughing

Je vais regarder ça de près alors. Merci pour ton retour. Wink
Revenir en haut Aller en bas
http://gpp.panoramic.free.fr
Minibug

Minibug


Nombre de messages : 4566
Age : 57
Localisation : Vienne (86)
Date d'inscription : 09/02/2012

Exemple d'une nouvelle version d'un GRID Empty
MessageSujet: Re: Exemple d'une nouvelle version d'un GRID   Exemple d'une nouvelle version d'un GRID EmptySam 7 Avr 2018 - 14:39

Je viens de tester et c'est super ! cheers
On va avoir un vrai grid avec des vraies fonctions qui vont avec !
Merci Klaus Wink

Revenir en haut Aller en bas
http://gpp.panoramic.free.fr
Klaus

Klaus


Nombre de messages : 12298
Age : 75
Localisation : Ile de France
Date d'inscription : 29/12/2009

Exemple d'une nouvelle version d'un GRID Empty
MessageSujet: Re: Exemple d'une nouvelle version d'un GRID   Exemple d'une nouvelle version d'un GRID EmptyVen 13 Avr 2018 - 3:03

Voici un grand pas en avant avec ce composant KGFGrid. La nouvelle version est disponible sur le WebDav dossier DLLs, ainsi que sur mes deux sites.

On peut maintenant affecter des formules de calcul à des rectangles de cellules délimités par les coordonnées du coin en haut à gauche et en bas à droite. On peut aussi donner des noms à des cellules. Si l'on utilise dans les formules des cellules désignées par leur nom, celles-ci feront automatiquement partie d'une actualisation dès qu'une des cellules est modifiée. Ceci se rapproche du fonctionnement d'un vrai tableur.

Actuellement, les fonctions sont écrites sous forme de chaînes de caractères en notation anti-polonaise, à la manière de la progammation de l'antique calculette HP35. Ceci élimine d'emblée le problème des parenthèses, des priorités des opérations etc, et est facilement extensible pour l'ajout d'opérations, de fonctions intrinsèques etc. Tout est organisé autour d'une pile LIFO (Last In First Out).

Voici les possibilités actuelles:
Empiler une valeur constante: Vvaleur^ (1 valeur)
Empile rla valeur d'une cellule: Cnom^ (1  valeur)
Empiler les coordonnées d'une cellule: cnom^ (2 valeurs)
Dépiler deux éléments, les prendre comme coordonnées de cellule et empiler son contenu: v (1 valeur)
Opérateurs arithmétiques: + - * / (dépile deux éléments et empile le résultat)
Déposer les coordonnées d'une fourchette (rectangle) de cellules: cnom1|cnom2| (4 valeurs)
Dépiler et mémoriser la fourchette: R (Range, 4 valeurs)
Utiliser la fourchette mémorisée pour additionner toutes les cellules, empiler le résultat: S (Somme)
Utiliser la fourchette mémorisée pour effacer toutes les cellules: Z (Zero)
Dépiler le haut de la pile et l'affecter à la cellule active: ;

Voici le programme de démo:
Code:
' test_KGFGrid.bas

label UserEvent
dim res%, KG%, f1$, Types$(6), v$, f, img$
  Types$(0) = "Inconnu (traité comme Integer)"
  Types$(1) = "Chaîne"
  Types$(2) = "Entier"
  Types$(3) = "Flottant"
  Types$(4) = "Booléen"
  Types$(5) = "Image"
  Types$(6) = "Mémo"
  
picture 1 : top 1,100 : left 1,420 : width 1,150 : height 1,150 : stretch_on 1  
memo 2 : top 2,10 : left 2,10 : width 2,400 : bar_both 2
dll_on "KGF.dll"

KG% = dll_call2("CreateKGFGrid",handle(0),13)                      : ' ok
res% = dll_call2("SetGlobalKGFGridColors",KG%,hex("FFFF"))         : ' ok
res% = dll_call5("LocateKGFGrid",KG%,10,100,400,300)               : ' ok
res% = dll_call5("SetGlobalKGFGridDimensions",KG%,15,20,50,25)     : ' ok
res% = dll_call4("SetKGFGridRowRangeHeight",KG%,2,4,45)            : ' ok
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,7,10,20)         : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,2,4,2,5,2)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,5,7,2,5,1)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,8,9,2,5,3)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,9,9,6,6,3)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,5,8,6,6,4)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,2,4,6,6,5)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,3,3,1,1,6)          : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,4,2,5,5) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,4,2,5,hex("FF8080")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,2,2,4,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,3,3,2,2,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,3,3,4,4,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,4,4,2,4,hex("8080FF")) : ' ok

res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,2,2,1) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,3,3,2,2,2) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,2,2,3) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,3,3,4) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,3,3,6) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,4,4,7) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,3,3,4,4,8) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,4,4,9) : ' ok
f1$ = "%d €"                                                                
res% = dll_call6("SetKGFGridCellRangeFormat",KG%,2,4,2,5,adr(f1$)) : ' ok

res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,2,4,17)        : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,2,4,0-23)      : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,2,4,123)       : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,4,5,5,0-12)      : ' ok
v$ = "Salut"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,5,5,2,4,adr(v$))   : ' ok
v$ = "les"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,6,6,2,4,adr(v$))   : ' ok
v$ = "copains"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,7,7,2,4,adr(v$))   : ' ok
f = pi
res% = dll_call6("SetKGFGridCellRangeValue",KG%,8,8,2,4,adr(f))    : ' ok

img$ = "Android.bmp"
res% = dll_call1("LoadAnyImageFile",adr(img$))
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,6,6,0)         : ' ok
img$ = "marche_1_1_1_2.jpg"
res% = dll_call1("LoadAnyImageFile",adr(img$))
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,6,6,0)         : ' ok
img$ = "crane.bmp"
res% = dll_call1("LoadAnyImageFile",adr(img$))
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,6,6,0)         : ' ok

font_names_load 2
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,1,1,handle(2)) : ' ok
clear 2

res% = dll_call6("SetKGFGridCellRangeFontBold",KG%,5,5,2,4,1)      : ' ok
res% = dll_call6("SetKGFGridCellRangeFontItalic",KG%,5,5,2,4,1)    : ' ok

v$ = "Arial Black"
res% = dll_call6("SetKGFGridCellRangeFontName",KG%,6,6,2,4,adr(v$)) : ' ok
res% = dll_call6("SetKGFGridCellRangeFontSize",KG%,6,6,2,4,12)    : ' ok

res% = dll_call6("SetKGFGridCellRangeFontColor",KG%,7,7,2,4,hex("FF0000"))  : ' ok


v$ = "Prix"
res% = dll_call4("SetKGFGridCellName",KG%,9,2,adr(v$))
v$ = "Total"
res% = dll_call4("SetKGFGridCellName",KG%,9,3,adr(v$))
v$ = "Resultat"
res% = dll_call4("SetKGFGridCellName",KG%,9,4,adr(v$))
v$ = "Premier"
res% = dll_call4("SetKGFGridCellName",KG%,2,2,adr(v$))
v$ = "Dernier"
res% = dll_call4("SetKGFGridCellName",KG%,4,4,adr(v$))
v$ = "Suite"
res% = dll_call4("SetKGFGridCellName",KG%,9,5,adr(v$))

f1$ = "V10^CPrix^*;"
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,9,9,3,3,adr(f1$))
f1$ = "V2^V2^V2^V4^RS;"
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,9,9,4,4,adr(f1$))
f1$ = "cPremier|cDernier|RS;"
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,9,9,5,5,adr(f1$))
f1$ = "CTotal^V2^*;"
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,9,9,6,6,adr(f1$))

f = 23.45
res% = dll_call6("SetKGFGridCellRangeValue",KG%,9,9,2,2,adr(f))    : ' ok

if 1=2
message "Les lignes 2 et 3 vont disparaître..."
res% = dll_call4("SetKGFGridRowRangeVisible",KG%,2,3,0)            : ' ok
message "Les lignes 2 et 3 on disparu, et vont réapparaître..."
res% = dll_call4("SetKGFGridRowRangeVisible",KG%,2,3,1)            : ' ok

message "Les colonnes 4 et 5 vont disparaître..."
res% = dll_call4("SetKGFGridColumnRangeVisible",KG%,4,5,0)         : ' ok
message "Les lignes 4 et 5 on disparu, et vont réapparaître..."
res% = dll_call4("SetKGFGridColumnRangeVisible",KG%,4,5,1)         : ' ok
end_if

on_user_event UserEvent

end

UserEvent:
  UserEvent()
  return
  
sub UserEvent()
  dim_local lig%, col%, id%, type%, res$, f
  if bin_and(user_event_wparam,hex("FF000000"))<>hex("0C000000") then exit_sub
  if bin_and(user_event_wparam,hex("00FF0000"))<>hex("00010000") then exit_sub
  id% = bin_and(user_event_wparam,hex("0000FFFF"))
  col% = user_event_lparam/65536
  lig% = bin_and(user_event_lparam,hex("0000FFFF"))
  delete 1
  picture 1 : top 1,100 : left 1,420 : width 1,150 : height 1,150 : stretch_on 1
  clear 2
  type% = dll_call3("GetKGFGridCellType",KG%,lig%,col%)               : ' ok
  select type%
    case 0: ' Inconnu
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)         : ' ok
      res$ = str$(res%)
    case 1: ' Chaîne
      res$ = string$(255," ")
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(res$)) : ' ok
      res$ = trim$(res$)
    case 2: ' Entier
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)         : ' ok
      res$ = str$(res%)
    case 3: ' flottant
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(f))    : ' ok
      res$ = str$(f)
    case 4: ' Booleen
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)         : ' ok
      res$ = str$(res%)
    case 5: ' Image
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)         : ' ok
      clipboard_paste 1
    case 6: ' Mémo
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,handle(2)) : ' ok
  end_select
  message "clic dans KGFGrid   ID="+str$(id%)+" en ligne "+str$(lig%)+" colonne "+str$(col%)+chr$(13)+chr$(10)+"Type="+Types$(type%)+"  valeur="+res$
  if type%=4
    res% = dll_call6("SetKGFGridCellRangeValue",KG%,lig%,lig%,col%,col%,1-res%)        : ' ok
  end_if
end_sub

Voici le résultat:
Exemple d'une nouvelle version d'un GRID Aa174

Ce qui est particulièrement intéressant, ce sont les cellules de la ligne 9.
La colonne 2 de cette ligne est chargée avec une valeur 23,45, à la ligne 108.
La colonne 3 de cette ligne est calculée par une formule définie en ligne 99, comme étant 10 fois le contenu de la colonne 2 de cette ligne.
La colonne 4 de cette ligne est calculée par une formule définie en ligne 100 comme étant la somme de la fourchette des cellules (2,2) ) (2,4).
La colonne 5 de cette ligne est calculée par une formule définie en ligne 103 comme étant la somme de toutes les cellules définies par Premier (ligne 2, colonne 2) et Dernier (Ligne 4 colonne 4).
La colonne 5 de cette ligne est calculée par une formule définie en ligne 105 comme étant le double de la colonne 3 de celle ligne (et hérite donc en deuxième génération de la valeur placée dans la cellule 2 de cette ligne !).

Tout ça est bien entendu encore en version Alpha. Si vous constatez des bugs, n'hésitez pas - ça fera avancer l'affaire. De mon côté, je vais me pencher maintenant surtout sur la doc des objets FlowChart et KGFGrid, afin de finaliser cette version de KGF.dll.


Dernière édition par Klaus le Ven 13 Avr 2018 - 22:50, édité 1 fois
Revenir en haut Aller en bas
http://klauspanoramic.comxa.com/index.html
Minibug

Minibug


Nombre de messages : 4566
Age : 57
Localisation : Vienne (86)
Date d'inscription : 09/02/2012

Exemple d'une nouvelle version d'un GRID Empty
MessageSujet: Re: Exemple d'une nouvelle version d'un GRID   Exemple d'une nouvelle version d'un GRID EmptyVen 13 Avr 2018 - 7:53

en voila des bonnes nouvelles !
Je regarderai ce soir... Wink
Revenir en haut Aller en bas
http://gpp.panoramic.free.fr
Klaus

Klaus


Nombre de messages : 12298
Age : 75
Localisation : Ile de France
Date d'inscription : 29/12/2009

Exemple d'une nouvelle version d'un GRID Empty
MessageSujet: Re: Exemple d'une nouvelle version d'un GRID   Exemple d'une nouvelle version d'un GRID EmptyVen 13 Avr 2018 - 18:45

Nouvelle version avec une légère amélioration: la fonction chargeant une image dans une cellule prenait l'image dans le presse-papier. Elle continue de faire ça, mais elle peut maintenant prendre l'image également dans n'importe quel fichier image (BMP, JPG, GIF, PNG, ICO, ...) si l'on passe adr(nom$) comme dernier paramètre, avec nom$ contenant le nom et le chemin du fichier. Si le dernier paramètre est zéro, la fonction utilise l'image du presse-papier, comme avant.

Voici le programme de démo avec un exemple pour les deux modes de fonctionnement:
Code:
' test_KGFGrid.bas

label UserEvent
dim res%, KG%, f1$, Types$(6), v$, f, img$
  Types$(0) = "Inconnu (traité comme Integer)"
  Types$(1) = "Chaîne"
  Types$(2) = "Entier"
  Types$(3) = "Flottant"
  Types$(4) = "Booléen"
  Types$(5) = "Image"
  Types$(6) = "Mémo"
 
picture 1 : top 1,100 : left 1,420 : width 1,150 : height 1,150 : stretch_on 1 
memo 2 : top 2,10 : left 2,10 : width 2,400 : bar_both 2
dll_on "KGF.dll"

KG% = dll_call2("CreateKGFGrid",handle(0),13)                      : ' ok
res% = dll_call2("SetGlobalKGFGridColors",KG%,hex("FFFF"))        : ' ok
res% = dll_call5("LocateKGFGrid",KG%,10,100,400,300)              : ' ok
res% = dll_call5("SetGlobalKGFGridDimensions",KG%,15,20,50,25)    : ' ok
res% = dll_call4("SetKGFGridRowRangeHeight",KG%,2,4,45)            : ' ok
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,7,10,20)        : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,2,4,2,5,2)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,5,7,2,5,1)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,8,9,2,5,3)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,9,9,6,6,3)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,5,8,6,6,4)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,2,4,6,6,5)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,3,3,1,1,6)          : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,4,2,5,5) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,4,2,5,hex("FF8080")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,2,2,4,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,3,3,2,2,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,3,3,4,4,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,4,4,2,4,hex("8080FF")) : ' ok

res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,2,2,1) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,3,3,2,2,2) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,2,2,3) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,3,3,4) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,3,3,6) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,4,4,7) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,3,3,4,4,8) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,4,4,9) : ' ok
f1$ = "%d €"                                                               
res% = dll_call6("SetKGFGridCellRangeFormat",KG%,2,4,2,5,adr(f1$)) : ' ok

res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,2,4,17)        : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,2,4,0-23)      : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,2,4,123)      : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,4,5,5,0-12)      : ' ok
v$ = "Salut"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,5,5,2,4,adr(v$))  : ' ok
v$ = "les"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,6,6,2,4,adr(v$))  : ' ok
v$ = "copains"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,7,7,2,4,adr(v$))  : ' ok
f = pi
res% = dll_call6("SetKGFGridCellRangeValue",KG%,8,8,2,4,adr(f))    : ' ok

img$ = "Android.bmp"
 res% = dll_call1("LoadAnyImageFile",adr(img$))
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,6,6,0)        : ' ok
img$ = "marche_1_1_1_2.jpg"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,6,6,adr(img$)) : ' ok
img$ = "crane.bmp"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,6,6,adr(img$)) : ' ok

font_names_load 2
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,1,1,handle(2)) : ' ok
clear 2

res% = dll_call6("SetKGFGridCellRangeFontBold",KG%,5,5,2,4,1)      : ' ok
res% = dll_call6("SetKGFGridCellRangeFontItalic",KG%,5,5,2,4,1)    : ' ok

v$ = "Arial Black"
res% = dll_call6("SetKGFGridCellRangeFontName",KG%,6,6,2,4,adr(v$)) : ' ok
res% = dll_call6("SetKGFGridCellRangeFontSize",KG%,6,6,2,4,12)    : ' ok

res% = dll_call6("SetKGFGridCellRangeFontColor",KG%,7,7,2,4,hex("FF0000"))  : ' ok


v$ = "Prix"
res% = dll_call4("SetKGFGridCellName",KG%,9,2,adr(v$))            : ' ok
v$ = "Total"
res% = dll_call4("SetKGFGridCellName",KG%,9,3,adr(v$))            : ' ok
v$ = "Resultat"
res% = dll_call4("SetKGFGridCellName",KG%,9,4,adr(v$))            : ' ok
v$ = "Premier"
res% = dll_call4("SetKGFGridCellName",KG%,2,2,adr(v$))            : ' ok
v$ = "Dernier"
res% = dll_call4("SetKGFGridCellName",KG%,4,4,adr(v$))            : ' ok
v$ = "Suite"
res% = dll_call4("SetKGFGridCellName",KG%,9,5,adr(v$))            : ' ok

f1$ = "V10^CPrix^*;"
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,9,9,3,3,adr(f1$))  : ' ok
f1$ = "V2^V2^V2^V4^RS;"
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,9,9,4,4,adr(f1$))  : ' ok
f1$ = "cPremier|cDernier|RS;"
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,9,9,5,5,adr(f1$))  : ' ok
f1$ = "CTotal^V2^*;"
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,9,9,6,6,adr(f1$))  : ' ok

f = 23.45
res% = dll_call6("SetKGFGridCellRangeValue",KG%,9,9,2,2,adr(f))    : ' ok

message "Les lignes 2 et 3 vont disparaître..."
res% = dll_call4("SetKGFGridRowRangeVisible",KG%,2,3,0)            : ' ok
message "Les lignes 2 et 3 on disparu, et vont réapparaître..."
res% = dll_call4("SetKGFGridRowRangeVisible",KG%,2,3,1)            : ' ok

message "Les colonnes 4 et 5 vont disparaître..."
res% = dll_call4("SetKGFGridColumnRangeVisible",KG%,4,5,0)        : ' ok
message "Les lignes 4 et 5 on disparu, et vont réapparaître..."
res% = dll_call4("SetKGFGridColumnRangeVisible",KG%,4,5,1)        : ' ok

on_user_event UserEvent

end

UserEvent:
  UserEvent()
  return
 
sub UserEvent()
  dim_local lig%, col%, id%, type%, res$, f
  if bin_and(user_event_wparam,hex("FF000000"))<>hex("0C000000") then exit_sub
  if bin_and(user_event_wparam,hex("00FF0000"))<>hex("00010000") then exit_sub
  id% = bin_and(user_event_wparam,hex("0000FFFF"))
  col% = user_event_lparam/65536
  lig% = bin_and(user_event_lparam,hex("0000FFFF"))
  delete 1
  picture 1 : top 1,100 : left 1,420 : width 1,150 : height 1,150 : stretch_on 1
  clear 2
  type% = dll_call3("GetKGFGridCellType",KG%,lig%,col%)              : ' ok
  select type%
    case 0: ' Inconnu
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      res$ = str$(res%)
    case 1: ' Chaîne
      res$ = string$(255," ")
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(res$)) : ' ok
      res$ = trim$(res$)
    case 2: ' Entier
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      res$ = str$(res%)
    case 3: ' flottant
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(f))    : ' ok
      res$ = str$(f)
    case 4: ' Booleen
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      res$ = str$(res%)
    case 5: ' Image
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      clipboard_paste 1
    case 6: ' Mémo
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,handle(2)) : ' ok
  end_select
  message "clic dans KGFGrid  ID="+str$(id%)+" en ligne "+str$(lig%)+" colonne "+str$(col%)+chr$(13)+chr$(10)+"Type="+Types$(type%)+"  valeur="+res$
  if type%=4
    res% = dll_call6("SetKGFGridCellRangeValue",KG%,lig%,lig%,col%,col%,1-res%)        : ' ok
  end_if
end_sub

Revenir en haut Aller en bas
http://klauspanoramic.comxa.com/index.html
Klaus

Klaus


Nombre de messages : 12298
Age : 75
Localisation : Ile de France
Date d'inscription : 29/12/2009

Exemple d'une nouvelle version d'un GRID Empty
MessageSujet: Re: Exemple d'une nouvelle version d'un GRID   Exemple d'une nouvelle version d'un GRID EmptySam 14 Avr 2018 - 1:20

Nouvelle version de KGFGrid. Il y a maintenant une fonction de sauvegarde de l'objet dans un fichier. La dll est disponible sur le WebDav et mes deux sites.

Ce fichier de sauvegarde est un fichier texte, lisible, contenant toutes les informations requises pour reconstituer l'objet dans son état lors de la sauvegarde: configuration générale, structure du grid, dimensions, format et contenu des cellules, formules, dépendances requises pour le calcul, et toutes les données, même les images. Pour une image chargée directement par son nom de fichier, ce nom sera inscrit dans la sauvegarde. Mais pour une image récupérée dans le presse-papier, sa bitmap sera dumpée en hexadécimal.

Voici le programme de démo:
Code:
' test_KGFGrid.bas

label UserEvent
dim res%, KG%, f1$, Types$(6), v$, f, img$
  Types$(0) = "Inconnu (traité comme Integer)"
  Types$(1) = "Chaîne"
  Types$(2) = "Entier"
  Types$(3) = "Flottant"
  Types$(4) = "Booléen"
  Types$(5) = "Image"
  Types$(6) = "Mémo"
  
picture 1 : top 1,100 : left 1,420 : width 1,150 : height 1,150 : stretch_on 1  
memo 2 : top 2,10 : left 2,10 : width 2,400 : bar_both 2
dll_on "KGF.dll"

KG% = dll_call2("CreateKGFGrid",handle(0),13)                      : ' ok
res% = dll_call2("SetGlobalKGFGridColors",KG%,hex("FFFF"))         : ' ok
res% = dll_call5("LocateKGFGrid",KG%,10,100,400,300)               : ' ok
res% = dll_call5("SetGlobalKGFGridDimensions",KG%,15,20,50,25)     : ' ok
res% = dll_call4("SetKGFGridRowRangeHeight",KG%,2,4,45)            : ' ok
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,7,10,20)         : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,2,4,2,5,2)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,5,7,2,5,1)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,8,9,2,5,3)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,9,9,6,6,3)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,5,8,6,6,4)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,2,4,6,6,5)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,3,3,1,1,6)          : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,4,2,5,5) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,4,2,5,hex("FF8080")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,2,2,4,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,3,3,2,2,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,3,3,4,4,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,4,4,2,4,hex("8080FF")) : ' ok

res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,2,2,1) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,3,3,2,2,2) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,2,2,3) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,3,3,4) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,3,3,6) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,4,4,7) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,3,3,4,4,8) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,4,4,9) : ' ok
f1$ = "%d €"                                                                
res% = dll_call6("SetKGFGridCellRangeFormat",KG%,2,4,2,5,adr(f1$)) : ' ok

res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,2,4,17)        : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,2,4,0-23)      : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,2,4,123)       : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,4,5,5,0-12)      : ' ok
v$ = "Salut"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,5,5,2,4,adr(v$))   : ' ok
v$ = "les"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,6,6,2,4,adr(v$))   : ' ok
v$ = "copains"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,7,7,2,4,adr(v$))   : ' ok
f = pi
res% = dll_call6("SetKGFGridCellRangeValue",KG%,8,8,2,4,adr(f))    : ' ok

img$ = "Android.bmp"
 res% = dll_call1("LoadAnyImageFile",adr(img$))
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,6,6,0)         : ' ok
img$ = "marche_1_1_1_2.jpg"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,6,6,adr(img$)) : ' ok
img$ = "crane.bmp"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,6,6,adr(img$)) : ' ok

font_names_load 2
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,1,1,handle(2)) : ' ok
clear 2

res% = dll_call6("SetKGFGridCellRangeFontBold",KG%,5,5,2,4,1)      : ' ok
res% = dll_call6("SetKGFGridCellRangeFontItalic",KG%,5,5,2,4,1)    : ' ok

v$ = "Arial Black"
res% = dll_call6("SetKGFGridCellRangeFontName",KG%,6,6,2,4,adr(v$)) : ' ok
res% = dll_call6("SetKGFGridCellRangeFontSize",KG%,6,6,2,4,12)     : ' ok

res% = dll_call6("SetKGFGridCellRangeFontColor",KG%,7,7,2,4,hex("FF0000"))  : ' ok


v$ = "Prix"
res% = dll_call4("SetKGFGridCellName",KG%,9,2,adr(v$))             : ' ok
v$ = "Total"
res% = dll_call4("SetKGFGridCellName",KG%,9,3,adr(v$))             : ' ok
v$ = "Resultat"
res% = dll_call4("SetKGFGridCellName",KG%,9,4,adr(v$))             : ' ok
v$ = "Premier"
res% = dll_call4("SetKGFGridCellName",KG%,2,2,adr(v$))             : ' ok
v$ = "Dernier"
res% = dll_call4("SetKGFGridCellName",KG%,4,4,adr(v$))             : ' ok
v$ = "Suite"
res% = dll_call4("SetKGFGridCellName",KG%,9,5,adr(v$))             : ' ok

f1$ = "V10^CPrix^*;"
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,9,9,3,3,adr(f1$))  : ' ok
f1$ = "V2^V2^V2^V4^RS;"
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,9,9,4,4,adr(f1$))  : ' ok
f1$ = "cPremier|cDernier|RS;"
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,9,9,5,5,adr(f1$))  : ' ok
f1$ = "CTotal^V2^*;"
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,9,9,6,6,adr(f1$))  : ' ok

f = 23.45
res% = dll_call6("SetKGFGridCellRangeValue",KG%,9,9,2,2,adr(f))    : ' ok

message "Les lignes 2 et 3 vont disparaître..."
res% = dll_call4("SetKGFGridRowRangeVisible",KG%,2,3,0)            : ' ok
message "Les lignes 2 et 3 on disparu, et vont réapparaître..."
res% = dll_call4("SetKGFGridRowRangeVisible",KG%,2,3,1)            : ' ok

message "Les colonnes 4 et 5 vont disparaître..."
res% = dll_call4("SetKGFGridColumnRangeVisible",KG%,4,5,0)         : ' ok
message "Les lignes 4 et 5 on disparu, et vont réapparaître..."
res% = dll_call4("SetKGFGridColumnRangeVisible",KG%,4,5,1)         : ' ok

f1$ = "KGFGrid_backup.txt"
res% = dll_call2("SaveKGFGridToFile",KG%,adr(f1$))                : ' ok
if res%<0
  message "Erreur en sauvegarde du KGFGrid"
else
  message "Le KGFGrid est sauvegardé dans "+f1$
end_if

on_user_event UserEvent

end

UserEvent:
  UserEvent()
  return
  
sub UserEvent()
  dim_local lig%, col%, id%, type%, res$, f
  if bin_and(user_event_wparam,hex("FF000000"))<>hex("0C000000") then exit_sub
  if bin_and(user_event_wparam,hex("00FF0000"))<>hex("00010000") then exit_sub
  id% = bin_and(user_event_wparam,hex("0000FFFF"))
  col% = user_event_lparam/65536
  lig% = bin_and(user_event_lparam,hex("0000FFFF"))
  delete 1
  picture 1 : top 1,100 : left 1,420 : width 1,150 : height 1,150 : stretch_on 1
  clear 2
  type% = dll_call3("GetKGFGridCellType",KG%,lig%,col%)               : ' ok
  select type%
    case 0: ' Inconnu
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)         : ' ok
      res$ = str$(res%)
    case 1: ' Chaîne
      res$ = string$(255," ")
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(res$)) : ' ok
      res$ = trim$(res$)
    case 2: ' Entier
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)         : ' ok
      res$ = str$(res%)
    case 3: ' flottant
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(f))    : ' ok
      res$ = str$(f)
    case 4: ' Booleen
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)         : ' ok
      res$ = str$(res%)
    case 5: ' Image
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)         : ' ok
      clipboard_paste 1
    case 6: ' Mémo
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,handle(2)) : ' ok
  end_select
  message "clic dans KGFGrid   ID="+str$(id%)+" en ligne "+str$(lig%)+" colonne "+str$(col%)+chr$(13)+chr$(10)+"Type="+Types$(type%)+"  valeur="+res$
  if type%=4
    res% = dll_call6("SetKGFGridCellRangeValue",KG%,lig%,lig%,col%,col%,1-res%)        : ' ok
  end_if
end_sub

Revenir en haut Aller en bas
http://klauspanoramic.comxa.com/index.html
Klaus

Klaus


Nombre de messages : 12298
Age : 75
Localisation : Ile de France
Date d'inscription : 29/12/2009

Exemple d'une nouvelle version d'un GRID Empty
MessageSujet: Re: Exemple d'une nouvelle version d'un GRID   Exemple d'une nouvelle version d'un GRID EmptyDim 15 Avr 2018 - 1:34

Nouvelle version de l'objet KGFGrid, disponible sur le WebDav et mes deux sites.

Il y a maintenant une fonction de restauration, symmétrique à celle qui fait la sauvegarde d'un tel objet. A priori, le jeu des fonctions est complet pour pouvoir exploiter cet objet.

Pour mémoire, voici le programme de démo (qui crée automatiquement une sauvegarde complète, à la fin):
Code:
' test_KGFGrid.bas

label UserEvent
dim res%, KG%, f1$, Types$(6), v$, f, img$
  Types$(0) = "Inconnu (traité comme Integer)"
  Types$(1) = "Chaîne"
  Types$(2) = "Entier"
  Types$(3) = "Flottant"
  Types$(4) = "Booléen"
  Types$(5) = "Image"
  Types$(6) = "Mémo"
 
picture 1 : top 1,100 : left 1,420 : width 1,150 : height 1,150 : stretch_on 1 
memo 2 : top 2,10 : left 2,10 : width 2,400 : bar_both 2
dll_on "KGF.dll"

KG% = dll_call2("CreateKGFGrid",handle(0),13)                      : ' ok
res% = dll_call2("SetGlobalKGFGridColors",KG%,hex("FFFF"))        : ' ok
res% = dll_call5("LocateKGFGrid",KG%,10,100,400,300)              : ' ok
res% = dll_call5("SetGlobalKGFGridDimensions",KG%,15,20,50,25)    : ' ok
res% = dll_call4("SetKGFGridRowRangeHeight",KG%,2,4,45)            : ' ok
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,7,10,20)        : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,2,4,2,5,2)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,5,7,2,5,1)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,8,9,2,5,3)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,9,9,6,6,3)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,5,8,6,6,4)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,2,4,6,6,5)          : ' ok
res% = dll_call6("SetKGFGridCellRangeType",KG%,3,3,1,1,6)          : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,4,2,5,5) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,4,2,5,hex("FF8080")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,2,2,4,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,3,3,2,2,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,3,3,4,4,hex("8080FF")) : ' ok
res% = dll_call6("SetKGFGridCellRangeColor",KG%,4,4,2,4,hex("8080FF")) : ' ok

res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,2,2,1) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,3,3,2,2,2) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,2,2,3) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,3,3,4) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,3,3,6) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,2,2,4,4,7) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,3,3,4,4,8) : ' ok
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,4,4,4,4,9) : ' ok
f1$ = "%d €"                                                               
res% = dll_call6("SetKGFGridCellRangeFormat",KG%,2,4,2,5,adr(f1$)) : ' ok

res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,2,4,17)        : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,2,4,0-23)      : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,2,4,123)      : ' ok
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,4,5,5,0-12)      : ' ok
v$ = "Salut"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,5,5,2,4,adr(v$))  : ' ok
v$ = "les"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,6,6,2,4,adr(v$))  : ' ok
v$ = "copains"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,7,7,2,4,adr(v$))  : ' ok
f = pi
res% = dll_call6("SetKGFGridCellRangeValue",KG%,8,8,2,4,adr(f))    : ' ok

img$ = "Android.bmp"
 res% = dll_call1("LoadAnyImageFile",adr(img$))
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,6,6,0)        : ' ok
img$ = "marche_1_1_1_2.jpg"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,6,6,adr(img$)) : ' ok
img$ = "crane.bmp"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,6,6,adr(img$)) : ' ok

font_names_load 2
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,1,1,handle(2)) : ' ok
clear 2

res% = dll_call6("SetKGFGridCellRangeFontBold",KG%,5,5,2,4,1)      : ' ok
res% = dll_call6("SetKGFGridCellRangeFontItalic",KG%,5,5,2,4,1)    : ' ok

v$ = "Arial Black"
res% = dll_call6("SetKGFGridCellRangeFontName",KG%,6,6,2,4,adr(v$)) : ' ok
res% = dll_call6("SetKGFGridCellRangeFontSize",KG%,6,6,2,4,12)    : ' ok

res% = dll_call6("SetKGFGridCellRangeFontColor",KG%,7,7,2,4,hex("FF0000"))  : ' ok


v$ = "Prix"
res% = dll_call4("SetKGFGridCellName",KG%,9,2,adr(v$))            : ' ok
v$ = "Total"
res% = dll_call4("SetKGFGridCellName",KG%,9,3,adr(v$))            : ' ok
v$ = "Resultat"
res% = dll_call4("SetKGFGridCellName",KG%,9,4,adr(v$))            : ' ok
v$ = "Premier"
res% = dll_call4("SetKGFGridCellName",KG%,2,2,adr(v$))            : ' ok
v$ = "Dernier"
res% = dll_call4("SetKGFGridCellName",KG%,4,4,adr(v$))            : ' ok
v$ = "Suite"
res% = dll_call4("SetKGFGridCellName",KG%,9,5,adr(v$))            : ' ok

f1$ = "V10^CPrix^*;"
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,9,9,3,3,adr(f1$))  : ' ok
f1$ = "V2^V2^V2^V4^RS;"
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,9,9,4,4,adr(f1$))  : ' ok
f1$ = "cPremier|cDernier|RS;"
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,9,9,5,5,adr(f1$))  : ' ok
f1$ = "CTotal^V2^*;"
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,9,9,6,6,adr(f1$))  : ' ok

f = 23.45
res% = dll_call6("SetKGFGridCellRangeValue",KG%,9,9,2,2,adr(f))    : ' ok

message "Les lignes 2 et 3 vont disparaître..."
res% = dll_call4("SetKGFGridRowRangeVisible",KG%,2,3,0)            : ' ok
message "Les lignes 2 et 3 on disparu, et vont réapparaître..."
res% = dll_call4("SetKGFGridRowRangeVisible",KG%,2,3,1)            : ' ok

message "Les colonnes 4 et 5 vont disparaître..."
res% = dll_call4("SetKGFGridColumnRangeVisible",KG%,4,5,0)        : ' ok
message "Les lignes 4 et 5 on disparu, et vont réapparaître..."
res% = dll_call4("SetKGFGridColumnRangeVisible",KG%,4,5,1)        : ' ok

f1$ = "KGFGrid_backup.txt"
res% = dll_call2("SaveKGFGridToFile",KG%,adr(f1$))                : ' ok
if res%<0
  message "Erreur en sauvegarde du KGFGrid"
else
  message "Le KGFGrid est sauvegardé dans "+f1$
end_if

on_user_event UserEvent

end

UserEvent:
  UserEvent()
  return
 
sub UserEvent()
  dim_local lig%, col%, id%, type%, res$, f
  if bin_and(user_event_wparam,hex("FF000000"))<>hex("0C000000") then exit_sub
  if bin_and(user_event_wparam,hex("00FF0000"))<>hex("00010000") then exit_sub
  id% = bin_and(user_event_wparam,hex("0000FFFF"))
  col% = user_event_lparam/65536
  lig% = bin_and(user_event_lparam,hex("0000FFFF"))
  delete 1
  picture 1 : top 1,100 : left 1,420 : width 1,150 : height 1,150 : stretch_on 1
  clear 2
  type% = dll_call3("GetKGFGridCellType",KG%,lig%,col%)              : ' ok
  select type%
    case 0: ' Inconnu
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      res$ = str$(res%)
    case 1: ' Chaîne
      res$ = string$(255," ")
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(res$)) : ' ok
      res$ = trim$(res$)
    case 2: ' Entier
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      res$ = str$(res%)
    case 3: ' flottant
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(f))    : ' ok
      res$ = str$(f)
    case 4: ' Booleen
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      res$ = str$(res%)
    case 5: ' Image
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      clipboard_paste 1
    case 6: ' Mémo
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,handle(2)) : ' ok
  end_select
  message "clic dans KGFGrid  ID="+str$(id%)+" en ligne "+str$(lig%)+" colonne "+str$(col%)+chr$(13)+chr$(10)+"Type="+Types$(type%)+"  valeur="+res$
  if type%=4
    res% = dll_call6("SetKGFGridCellRangeValue",KG%,lig%,lig%,col%,col%,1-res%)        : ' ok
  end_if
end_sub

Il faut faire marcher ce programme au moins une fois, pour pouvir utiliser le programme ci-après qui restaure simplement le KGFGrid tel qu'il a été sauvegardé:
Code:
' test_KGFGrid_avec_LoadFromFile.bas

label UserEvent
dim res%, KG%, f1$, Types$(6), v$, f, img$
  Types$(0) = "Inconnu (traité comme Integer)"
  Types$(1) = "Chaîne"
  Types$(2) = "Entier"
  Types$(3) = "Flottant"
  Types$(4) = "Booléen"
  Types$(5) = "Image"
  Types$(6) = "Mémo"
 
picture 1 : top 1,100 : left 1,420 : width 1,150 : height 1,150 : stretch_on 1 
memo 2 : top 2,10 : left 2,10 : width 2,400 : bar_both 2
dll_on "KGF.dll"

KG% = dll_call2("CreateKGFGrid",handle(0),13)                      : ' ok

f1$ = "KGFGrid_backup.txt"
res% = dll_call2("LoadKGFGridFromFile",KG%,adr(f1$))
message str$(res%)

on_user_event UserEvent 

end

UserEvent:
  UserEvent()
  return
 
sub UserEvent()
  dim_local lig%, col%, id%, type%, res$, f
  if bin_and(user_event_wparam,hex("FF000000"))<>hex("0C000000") then exit_sub
  if bin_and(user_event_wparam,hex("00FF0000"))<>hex("00010000") then exit_sub
  id% = bin_and(user_event_wparam,hex("0000FFFF"))
  col% = user_event_lparam/65536
  lig% = bin_and(user_event_lparam,hex("0000FFFF"))
  delete 1
  picture 1 : top 1,100 : left 1,420 : width 1,150 : height 1,150 : stretch_on 1
  clear 2
  type% = dll_call3("GetKGFGridCellType",KG%,lig%,col%)              : ' ok
  select type%
    case 0: ' Inconnu
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      res$ = str$(res%)
    case 1: ' Chaîne
      res$ = string$(255," ")
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(res$)) : ' ok
      res$ = trim$(res$)
    case 2: ' Entier
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      res$ = str$(res%)
    case 3: ' flottant
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(f))    : ' ok
      res$ = str$(f)
    case 4: ' Booleen
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      res$ = str$(res%)
    case 5: ' Image
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      clipboard_paste 1
    case 6: ' Mémo
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,handle(2)) : ' ok
  end_select
  message "clic dans KGFGrid  ID="+str$(id%)+" en ligne "+str$(lig%)+" colonne "+str$(col%)+chr$(13)+chr$(10)+"Type="+Types$(type%)+"  valeur="+res$
  if type%=4
    res% = dll_call6("SetKGFGridCellRangeValue",KG%,lig%,lig%,col%,col%,1-res%)        : ' ok
  end_if
end_sub
Revenir en haut Aller en bas
http://klauspanoramic.comxa.com/index.html
Klaus

Klaus


Nombre de messages : 12298
Age : 75
Localisation : Ile de France
Date d'inscription : 29/12/2009

Exemple d'une nouvelle version d'un GRID Empty
MessageSujet: Re: Exemple d'une nouvelle version d'un GRID   Exemple d'une nouvelle version d'un GRID EmptyMar 17 Avr 2018 - 1:09

Nouvelle version de l'objet KGFGrid, corrigeant certaines anomalies, et offrant une nouvelle fonction qui peut rendre inactive (sans réponse à un clic) des rectangles de cellules.

Cette version est disponible sur mon WebDav uniquement.

Avec cette version, j'ai fait une nouvelle démo: une facture.
Elle a 6 colonnes:
Libellé, quantité, prix unitaire, total ligne HT, taux TVA, total ligne TTC.
Elle a 15 lignes:
1 ligne de titre
13 lignes de détail
1 ligne de totaux.
Le programme remplit, dans 3 lignes de détail, les champs libellé, quantité, priix unitaire et taux de TVA. Le reste est calculé automatiquement par l'objet KGFGrid, comme dans un vrai tableur.

Voici le code du programme de facture:
Code:
' test_KGFGrid_facture.bas

label UserEvent
dim res%, KG%, f1$, Types$(6), v$, f, img$
  Types$(0) = "Inconnu (traité comme Integer)"
  Types$(1) = "Chaîne"
  Types$(2) = "Entier"
  Types$(3) = "Flottant"
  Types$(4) = "Booléen"
  Types$(5) = "Image"
  Types$(6) = "Mémo"
  
  full_space 0
dll_on "KGF.dll"

KG% = dll_call2("CreateKGFGrid",handle(0),13)                    
res% = dll_call5("LocateKGFGrid",KG%,10,100,652,377)              
' colonnes:
'  Libellé, quantité, Prix unitaire HT, total HT, taux TVA, total TTC
res% = dll_call5("SetGlobalKGFGridDimensions",KG%,15,6,50,25)    
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,14,1,6,hex("FFFFFF"))
v$ = "Arial"
res% = dll_call6("SetKGFGridCellRangeFontName",KG%,1,15,1,6,adr(v$))
res% = dll_call6("SetKGFGridCellRangeFontSize",KG%,1,15,1,6,12)    
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,1,15,1,6,2)
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,1,15,2,6,7)

res% = dll_call6("SetKGFGridCellRangeType",KG%,1,1,1,6,1)      : ' ligne des titres de colonnes
res% = dll_call6("SetKGFGridCellRangeFontBold",KG%,1,1,1,6,1)
res% = dll_call6("SetKGFGridCellRangeActive",KG%,1,1,1,6,0)
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,1,1,200)     : ' libellé
v$ = "Libellé"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,1,1,1,1,adr(v$))  
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,2,2,80)      : ' quantité
v$ = "Qté"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,1,1,2,2,adr(v$))
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,3,3,100)     : ' prix unitaire
v$ = "Prix U."
res% = dll_call6("SetKGFGridCellRangeValue",KG%,1,1,3,3,adr(v$))  
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,4,4,100)     : ' total HT
v$ = "Total HT"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,1,1,4,4,adr(v$))  
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,5,5,70)      : ' taux TVA
v$ = "Tx TVA"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,1,1,5,5,adr(v$))  
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,6,6,100)      : ' total TTC
v$ = "Total TTC"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,1,1,6,6,adr(v$))  

res% = dll_call6("SetKGFGridCellRangeType",KG%,2,15,1,1,1)      : ' colonne des libéllées
res% = dll_call6("SetKGFGridCellRangeType",KG%,2,15,2,6,3)      : ' colonnes de valeurs

res% = dll_call6("SetKGFGridCellRangeActive",KG%,15,15,1,6,0)   : ' ligne des totaux
v$ = "Total"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,15,15,1,1,adr(v$))

f1$ = "$RyC2^$RyC3^*;"                                          : ' calcul du HT par ligne
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,2,14,4,4,adr(f1$))
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,14,4,4,hex("C0C0FF"))

f1$ = "$RyC4^$RyC5^V100^+*V100^/;"                              : ' calcul du TTC par ligne
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,2,14,6,6,adr(f1$))
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,14,6,6,hex("C0C0FF"))

f1$ = "cR2C2|cR14C2|RS;"                                        : ' calcul du nombre d'unités
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,15,15,2,2,adr(f1$))

f1$ = "cR2C4|cR14C4|RS;"                                        : ' calcul du total HT
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,15,15,4,4,adr(f1$))

f1$ = "cR2C6|cR14C6|RS;"                                        : ' calcul du total TTC
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,15,15,6,6,adr(f1$))

v$ = "Robinets de lavabo"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,1,1,adr(v$)) : ' chargement 1er produit
f = 3
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,2,2,adr(f))
f = 17.5
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,3,3,adr(f))
f = 20
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,5,5,adr(f))
  
v$ = "Parquet chêne"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,1,1,adr(v$)) : ' chargement 2ème produit
f = 2.5
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,2,2,adr(f))  
f = 50
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,3,3,adr(f))  
f = 20
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,5,5,adr(f))

v$ = "Raccords cuivre"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,1,1,adr(v$)) : ' chargement 3ème produit
f = 12
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,2,2,adr(f))  
f = 2.5
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,3,3,adr(f))  
f = 10
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,5,5,adr(f))


on_user_event UserEvent

end

UserEvent:
  UserEvent()
  return
  
sub UserEvent()
  dim_local lig%, col%, id%, type%, res$, f
  if bin_and(user_event_wparam,hex("FF000000"))<>hex("0C000000") then exit_sub
  if bin_and(user_event_wparam,hex("00FF0000"))<>hex("00010000") then exit_sub
  id% = bin_and(user_event_wparam,hex("0000FFFF"))
  col% = user_event_lparam/65536
  lig% = bin_and(user_event_lparam,hex("0000FFFF"))
'  delete 1
'  picture 1 : top 1,100 : left 1,420 : width 1,150 : height 1,150 : stretch_on 1
'  clear 2
  type% = dll_call3("GetKGFGridCellType",KG%,lig%,col%)               : ' ok
  select type%
    case 0: ' Inconnu
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)         : ' ok
      res$ = str$(res%)
    case 1: ' Chaîne
      res$ = string$(255," ")
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(res$)) : ' ok
      res$ = trim$(res$)
    case 2: ' Entier
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)         : ' ok
      res$ = str$(res%)
    case 3: ' flottant
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(f))    : ' ok
      res$ = str$(f)
    case 4: ' Booleen
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)         : ' ok
      res$ = str$(res%)
    case 5: ' Image
'      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)         : ' ok
'      clipboard_paste 1
    case 6: ' Mémo
'      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,handle(2)) : ' ok
  end_select
  message "clic dans KGFGrid   ID="+str$(id%)+" en ligne "+str$(lig%)+" colonne "+str$(col%)+chr$(13)+chr$(10)+"Type="+Types$(type%)+"  valeur="+res$
  if type%=4
    res% = dll_call6("SetKGFGridCellRangeValue",KG%,lig%,lig%,col%,col%,1-res%)        : ' ok
  end_if
end_sub


et le résultat:
Exemple d'une nouvelle version d'un GRID Aa175

Ces colonnes roses sont calculées automatiquement, ainsi que la dernière ligne. Notez le cadrage à droite des valeurs numériques.
Revenir en haut Aller en bas
http://klauspanoramic.comxa.com/index.html
Klaus

Klaus


Nombre de messages : 12298
Age : 75
Localisation : Ile de France
Date d'inscription : 29/12/2009

Exemple d'une nouvelle version d'un GRID Empty
MessageSujet: Re: Exemple d'une nouvelle version d'un GRID   Exemple d'une nouvelle version d'un GRID EmptyMar 17 Avr 2018 - 13:43

Nouvelle version: on peut maintenant envoyer des résultats d'une formule dans une cellule d'un autre objet KGFGrid ! Dans la formule, on spécifie l'adresse de la celule ciblée et l'identifiant du KGFGrid de destination telle que la fonction de création le retourne, et le tour est joué !

Cette version de KGF.dll est sur mon WebDav et sur les deux sites.

Pour en faire la démonstration, j'ai créé un deuxième KGFGrid dans mon programme de facture. Ce deuxième tableau n'a qu'une seule ligne et représente la ligne 15 des totaux, mais physiquement décalée puisque c'est un autre tableau. La ligne 15 du tableau d'origine existe toujours, mais elle a simplement été déclarée "invisible". Les formules de calcul du nombre total d'objets, du total global HT et du total global TTC ont été modifiées pour copier le résultat dans le deuxième tableau.

Voici le programme de démo:
Code:
' test_KGFGrid_facture.bas

label UserEvent
dim res%, KG%, KGtot%, f1$, Types$(6), v$, f, img$
  Types$(0) = "Inconnu (traité comme Integer)"
  Types$(1) = "Chaîne"
  Types$(2) = "Entier"
  Types$(3) = "Flottant"
  Types$(4) = "Booléen"
  Types$(5) = "Image"
  Types$(6) = "Mémo"
 
  full_space 0
dll_on "KGF.dll"

KG% = dll_call2("CreateKGFGrid",handle(0),13)                   
' res% = dll_call5("LocateKGFGrid",KG%,10,100,652,377)  : ' si l'on rend la ligne 15 visible           
res% = dll_call5("LocateKGFGrid",KG%,10,100,652,352)  : ' si la ligne 15 est invisible           
KGtot% = dll_call2("CreateKGFGrid",handle(0),13)                   
res% = dll_call5("LocateKGFGrid",KGtot%,10,490,652,27)             
' colonnes:
'  Libellé, quantité, Prix unitaire HT, total HT, taux TVA, total TTC
res% = dll_call5("SetGlobalKGFGridDimensions",KG%,15,7,50,25)   
res% = dll_call4("SetKGFGridColumnRangeVisible",KG%,7,7,0)    : ' servira pour les liens vers une autre table
res% = dll_call4("SetKGFGridRowRangeVisible",KG%,15,15,0)     
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,14,1,6,hex("FFFFFF"))
res% = dll_call5("SetGlobalKGFGridDimensions",KGtot%,1,7,50,25)   
res% = dll_call4("SetKGFGridColumnRangeVisible",KGtot%,7,7,0)    : ' servira pour les liens vers une autre table
res% = dll_call6("SetKGFGridCellRangeColor",KGtot%,1,11,1,6,hex("C0C0FF"))
v$ = "Arial"
res% = dll_call6("SetKGFGridCellRangeFontName",KG%,1,15,1,6,adr(v$))
res% = dll_call6("SetKGFGridCellRangeFontSize",KG%,1,15,1,6,12)   
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,1,15,1,6,2)
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,1,15,2,6,7)
res% = dll_call6("SetKGFGridCellRangeFontName",KGtot%,1,1,1,6,adr(v$))
res% = dll_call6("SetKGFGridCellRangeFontSize",KGtot%,1,1,1,6,12)   
res% = dll_call6("SetKGFGridCellRangeJustification",KGtot%,1,1,1,6,2)
res% = dll_call6("SetKGFGridCellRangeJustification",KGtot%,1,1,2,6,7)

res% = dll_call6("SetKGFGridCellRangeType",KG%,1,1,1,6,1)      : ' ligne des titres de colonnes
res% = dll_call6("SetKGFGridCellRangeFontBold",KG%,1,1,1,6,1)
res% = dll_call6("SetKGFGridCellRangeActive",KG%,1,1,1,6,0)
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,1,1,200)    : ' libellé
res% = dll_call4("SetKGFGridColumnRangeWidth",KGtot%,1,1,200)   
v$ = "Libellé"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,1,1,1,1,adr(v$)) 
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,2,2,80)      : ' quantité
res% = dll_call4("SetKGFGridColumnRangeWidth",KGtot%,2,2,80)   
v$ = "Qté"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,1,1,2,2,adr(v$))
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,3,3,100)    : ' prix unitaire
res% = dll_call4("SetKGFGridColumnRangeWidth",KGtot%,3,3,100)   
v$ = "Prix U."
res% = dll_call6("SetKGFGridCellRangeValue",KG%,1,1,3,3,adr(v$)) 
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,4,4,100)    : ' total HT
res% = dll_call4("SetKGFGridColumnRangeWidth",KGtot%,4,4,100)   
v$ = "Total HT"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,1,1,4,4,adr(v$)) 
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,5,5,70)      : ' taux TVA
res% = dll_call4("SetKGFGridColumnRangeWidth",KGtot%,5,5,70)   
v$ = "Tx TVA"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,1,1,5,5,adr(v$)) 
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,6,6,100)      : ' total TTC
res% = dll_call4("SetKGFGridColumnRangeWidth",KGtot%,6,6,100)   
v$ = "Total TTC"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,1,1,6,6,adr(v$)) 

res% = dll_call6("SetKGFGridCellRangeType",KG%,2,15,1,1,1)      : ' colonne des libéllées
res% = dll_call6("SetKGFGridCellRangeType",KG%,2,15,2,7,3)      : ' colonnes de valeurs
res% = dll_call6("SetKGFGridCellRangeType",KGtot%,1,1,1,1,1)      : ' colonne des libéllées
res% = dll_call6("SetKGFGridCellRangeType",KGtot%,1,1,2,7,3)      : ' colonnes de valeurs

res% = dll_call6("SetKGFGridCellRangeActive",KG%,15,15,1,6,0)  : ' ligne des totaux
res% = dll_call6("SetKGFGridCellRangeActive",KGtot%,1,11,1,6,0)  : ' ligne des totaux
v$ = "Total"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,15,15,1,1,adr(v$))
res% = dll_call6("SetKGFGridCellRangeActive",KGtot%,1,11,1,6,0)  : ' ligne des totaux
res% = dll_call6("SetKGFGridCellRangeValue",KGtot%,1,1,1,1,adr(v$))

f1$ = "$RyC2^$RyC3^*;"                                          : ' calcul du HT par ligne
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,2,14,4,4,adr(f1$))
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,14,4,4,hex("C0C0FF"))

f1$ = "$RyC4^$RyC5^V100^+*V100^/;"                              : ' calcul du TTC par ligne
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,2,14,6,6,adr(f1$))
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,14,6,6,hex("C0C0FF"))

f1$ = "cR2C2|cR14C2|RScR1C2^V"+str$(KGtot%)+"^@;"                                        : ' calcul du nombre d'unités
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,15,15,2,2,adr(f1$))

f1$ = "cR2C4|cR14C4|RScR1C4^V"+str$(KGtot%)+"^@;"                                        : ' calcul du total HT
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,15,15,4,4,adr(f1$))

f1$ = "cR2C6|cR14C6|RScR1C6^V"+str$(KGtot%)+"^@;"                                        : ' calcul du total TTC
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,15,15,6,6,adr(f1$))

v$ = "Robinets de lavabo"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,1,1,adr(v$)) : ' chargement 1er produit
f = 3
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,2,2,adr(f))
f = 17.5
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,3,3,adr(f))
f = 20
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,5,5,adr(f))
 
v$ = "Parquet chêne"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,1,1,adr(v$)) : ' chargement 2ème produit
f = 2.5
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,2,2,adr(f)) 
f = 50
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,3,3,adr(f)) 
f = 20
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,5,5,adr(f))

v$ = "Raccords cuivre"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,1,1,adr(v$)) : ' chargement 3ème produit
f = 12
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,2,2,adr(f)) 
f = 2.5
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,3,3,adr(f)) 
f = 10
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,5,5,adr(f))


on_user_event UserEvent

end

UserEvent:
  UserEvent()
  return
 
sub UserEvent()
  dim_local lig%, col%, id%, type%, res$, f
  if bin_and(user_event_wparam,hex("FF000000"))<>hex("0C000000") then exit_sub
  if bin_and(user_event_wparam,hex("00FF0000"))<>hex("00010000") then exit_sub
  id% = bin_and(user_event_wparam,hex("0000FFFF"))
  col% = user_event_lparam/65536
  lig% = bin_and(user_event_lparam,hex("0000FFFF"))
'  delete 1
'  picture 1 : top 1,100 : left 1,420 : width 1,150 : height 1,150 : stretch_on 1
'  clear 2
  type% = dll_call3("GetKGFGridCellType",KG%,lig%,col%)              : ' ok
  select type%
    case 0: ' Inconnu
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      res$ = str$(res%)
    case 1: ' Chaîne
      res$ = string$(255," ")
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(res$)) : ' ok
      res$ = trim$(res$)
    case 2: ' Entier
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      res$ = str$(res%)
    case 3: ' flottant
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(f))    : ' ok
      res$ = str$(f)
    case 4: ' Booleen
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      res$ = str$(res%)
    case 5: ' Image
'      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
'      clipboard_paste 1
    case 6: ' Mémo
'      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,handle(2)) : ' ok
  end_select
  message "clic dans KGFGrid  ID="+str$(id%)+" en ligne "+str$(lig%)+" colonne "+str$(col%)+chr$(13)+chr$(10)+"Type="+Types$(type%)+"  valeur="+res$
  if type%=4
    res% = dll_call6("SetKGFGridCellRangeValue",KG%,lig%,lig%,col%,col%,1-res%)        : ' ok
  end_if
end_sub


et voici le résultat:
Exemple d'une nouvelle version d'un GRID Aa176
Revenir en haut Aller en bas
http://klauspanoramic.comxa.com/index.html
Klaus

Klaus


Nombre de messages : 12298
Age : 75
Localisation : Ile de France
Date d'inscription : 29/12/2009

Exemple d'une nouvelle version d'un GRID Empty
MessageSujet: Re: Exemple d'une nouvelle version d'un GRID   Exemple d'une nouvelle version d'un GRID EmptyMar 17 Avr 2018 - 18:04

Nouvelle version: on peut maintenant configurer un rectangle de cellules au contenu numérique (integer ou float) pour ne pas afficher de chiffres si la valeur est zéro, au lieu d'afficher 0 pour integer ou 0.00 pour float.

La nouvelle version est sur mon WebDav dossier DLls et sur les deux sites.

Voici le programme de facture, dans lequel ceci est appliqué pour le premier KGFGrid, celui qui contient le corps de la facture, mais pas sur le second qui contient les totaux:
Code:
' test_KGFGrid_facture.bas

label UserEvent
dim res%, KG%, KGtot%, f1$, Types$(6), v$, f, img$
  Types$(0) = "Inconnu (traité comme Integer)"
  Types$(1) = "Chaîne"
  Types$(2) = "Entier"
  Types$(3) = "Flottant"
  Types$(4) = "Booléen"
  Types$(5) = "Image"
  Types$(6) = "Mémo"
  
  full_space 0
dll_on "KGF.dll"

KG% = dll_call2("CreateKGFGrid",handle(0),13)                    
' res% = dll_call5("LocateKGFGrid",KG%,10,100,652,377)  : ' si l'on rend la ligne 15 visible            
res% = dll_call5("LocateKGFGrid",KG%,10,100,652,352)  : ' si la ligne 15 est invisible            
KGtot% = dll_call2("CreateKGFGrid",handle(0),13)                    
res% = dll_call5("LocateKGFGrid",KGtot%,10,490,652,27)              
' colonnes:
'  Libellé, quantité, Prix unitaire HT, total HT, taux TVA, total TTC
res% = dll_call5("SetGlobalKGFGridDimensions",KG%,15,7,50,25)    
res% = dll_call4("SetKGFGridColumnRangeVisible",KG%,7,7,0)    : ' servira pour les liens vers une autre table
res% = dll_call4("SetKGFGridRowRangeVisible",KG%,15,15,0)      
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,14,1,6,hex("FFFFFF"))
res% = dll_call5("SetGlobalKGFGridDimensions",KGtot%,1,7,50,25)    
res% = dll_call4("SetKGFGridColumnRangeVisible",KGtot%,7,7,0)    : ' servira pour les liens vers une autre table
res% = dll_call6("SetKGFGridCellRangeColor",KGtot%,1,11,1,6,hex("C0C0FF"))
v$ = "Arial"
res% = dll_call6("SetKGFGridCellRangeFontName",KG%,1,15,1,6,adr(v$))
res% = dll_call6("SetKGFGridCellRangeFontSize",KG%,1,15,1,6,12)    
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,1,15,1,6,2)
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,1,15,2,6,7)
res% = dll_call6("SetKGFGridCellRangeFontName",KGtot%,1,1,1,6,adr(v$))
res% = dll_call6("SetKGFGridCellRangeFontSize",KGtot%,1,1,1,6,12)    
res% = dll_call6("SetKGFGridCellRangeJustification",KGtot%,1,1,1,6,2)
res% = dll_call6("SetKGFGridCellRangeJustification",KGtot%,1,1,2,6,7)

res% = dll_call6("SetKGFGridCellRangeType",KG%,1,1,1,6,1)      : ' ligne des titres de colonnes
res% = dll_call6("SetKGFGridCellRangeFontBold",KG%,1,1,1,6,1)
res% = dll_call6("SetKGFGridCellRangeActive",KG%,1,1,1,6,0)
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,1,1,200)     : ' libellé
res% = dll_call4("SetKGFGridColumnRangeWidth",KGtot%,1,1,200)    
v$ = "Libellé"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,1,1,1,1,adr(v$))  
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,2,2,80)      : ' quantité
res% = dll_call4("SetKGFGridColumnRangeWidth",KGtot%,2,2,80)    
v$ = "Qté"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,1,1,2,2,adr(v$))
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,3,3,100)     : ' prix unitaire
res% = dll_call4("SetKGFGridColumnRangeWidth",KGtot%,3,3,100)    
v$ = "Prix U."
res% = dll_call6("SetKGFGridCellRangeValue",KG%,1,1,3,3,adr(v$))  
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,4,4,100)     : ' total HT
res% = dll_call4("SetKGFGridColumnRangeWidth",KGtot%,4,4,100)    
v$ = "Total HT"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,1,1,4,4,adr(v$))  
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,5,5,70)      : ' taux TVA
res% = dll_call4("SetKGFGridColumnRangeWidth",KGtot%,5,5,70)    
v$ = "Tx TVA"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,1,1,5,5,adr(v$))  
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,6,6,100)      : ' total TTC
res% = dll_call4("SetKGFGridColumnRangeWidth",KGtot%,6,6,100)    
v$ = "Total TTC"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,1,1,6,6,adr(v$))  

res% = dll_call6("SetKGFGridCellRangeType",KG%,2,15,1,1,1)      : ' colonne des libéllées
res% = dll_call6("SetKGFGridCellRangeType",KG%,2,15,2,7,3)      : ' colonnes de valeurs
res% = dll_call6("SetKGFGridCellRangeZeroAsSpace",KG%,2,15,2,7,1)    : ' ne pas afficher les valeurs zéro
res% = dll_call6("SetKGFGridCellRangeType",KGtot%,1,1,1,1,1)      : ' colonne des libéllées
res% = dll_call6("SetKGFGridCellRangeType",KGtot%,1,1,2,7,3)      : ' colonnes de valeurs

res% = dll_call6("SetKGFGridCellRangeActive",KG%,15,15,1,6,0)   : ' ligne des totaux
res% = dll_call6("SetKGFGridCellRangeActive",KGtot%,1,11,1,6,0)   : ' ligne des totaux
v$ = "Total"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,15,15,1,1,adr(v$))
res% = dll_call6("SetKGFGridCellRangeActive",KGtot%,1,11,1,6,0)   : ' ligne des totaux
res% = dll_call6("SetKGFGridCellRangeValue",KGtot%,1,1,1,1,adr(v$))

f1$ = "$RyC2^$RyC3^*;"                                          : ' calcul du HT par ligne
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,2,14,4,4,adr(f1$))
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,14,4,4,hex("C0C0FF"))

f1$ = "$RyC4^$RyC5^V100^+*V100^/;"                              : ' calcul du TTC par ligne
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,2,14,6,6,adr(f1$))
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,14,6,6,hex("C0C0FF"))

f1$ = "cR2C2|cR14C2|RScR1C2^V"+str$(KGtot%)+"^@;"                                        : ' calcul du nombre d'unités
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,15,15,2,2,adr(f1$))

f1$ = "cR2C4|cR14C4|RScR1C4^V"+str$(KGtot%)+"^@;"                                        : ' calcul du total HT
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,15,15,4,4,adr(f1$))

f1$ = "cR2C6|cR14C6|RScR1C6^V"+str$(KGtot%)+"^@;"                                        : ' calcul du total TTC
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,15,15,6,6,adr(f1$))

v$ = "Robinets de lavabo"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,1,1,adr(v$)) : ' chargement 1er produit
f = 3
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,2,2,adr(f))
f = 17.5
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,3,3,adr(f))
f = 20
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,5,5,adr(f))
  
v$ = "Parquet chêne"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,1,1,adr(v$)) : ' chargement 2ème produit
f = 2.5
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,2,2,adr(f))  
f = 50
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,3,3,adr(f))  
f = 20
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,5,5,adr(f))

v$ = "Raccords cuivre"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,1,1,adr(v$)) : ' chargement 3ème produit
f = 12
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,2,2,adr(f))  
f = 2.5
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,3,3,adr(f))  
f = 10
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,5,5,adr(f))


on_user_event UserEvent

end

UserEvent:
  UserEvent()
  return
  
sub UserEvent()
  dim_local lig%, col%, id%, type%, res$, f
  if bin_and(user_event_wparam,hex("FF000000"))<>hex("0C000000") then exit_sub
  if bin_and(user_event_wparam,hex("00FF0000"))<>hex("00010000") then exit_sub
  id% = bin_and(user_event_wparam,hex("0000FFFF"))
  col% = user_event_lparam/65536
  lig% = bin_and(user_event_lparam,hex("0000FFFF"))
'  delete 1
'  picture 1 : top 1,100 : left 1,420 : width 1,150 : height 1,150 : stretch_on 1
'  clear 2
  type% = dll_call3("GetKGFGridCellType",KG%,lig%,col%)               : ' ok
  select type%
    case 0: ' Inconnu
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)         : ' ok
      res$ = str$(res%)
    case 1: ' Chaîne
      res$ = string$(255," ")
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(res$)) : ' ok
      res$ = trim$(res$)
    case 2: ' Entier
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)         : ' ok
      res$ = str$(res%)
    case 3: ' flottant
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(f))    : ' ok
      res$ = str$(f)
    case 4: ' Booleen
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)         : ' ok
      res$ = str$(res%)
    case 5: ' Image
'      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)         : ' ok
'      clipboard_paste 1
    case 6: ' Mémo
'      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,handle(2)) : ' ok
  end_select
  message "clic dans KGFGrid   ID="+str$(id%)+" en ligne "+str$(lig%)+" colonne "+str$(col%)+chr$(13)+chr$(10)+"Type="+Types$(type%)+"  valeur="+res$
  if type%=4
    res% = dll_call6("SetKGFGridCellRangeValue",KG%,lig%,lig%,col%,col%,1-res%)        : ' ok
  end_if
end_sub


et le résutat:
Exemple d'une nouvelle version d'un GRID Aa178
Revenir en haut Aller en bas
http://klauspanoramic.comxa.com/index.html
Minibug

Minibug


Nombre de messages : 4566
Age : 57
Localisation : Vienne (86)
Date d'inscription : 09/02/2012

Exemple d'une nouvelle version d'un GRID Empty
MessageSujet: Re: Exemple d'une nouvelle version d'un GRID   Exemple d'une nouvelle version d'un GRID EmptyMar 17 Avr 2018 - 19:19

Bonsoir Klaus !

J'avoue ne pas encore m'être penché sur le Grid et toutes ses possibilités. Embarassed

Je suis actuellement dans la réalisation et la gestion des fenêtres synedit dans GPP,
avec les différents modes d'affichage (onglets, cascades, juxtaposées...)
et la gestion des tailles des fenêtres avec les sous-programmes.
C'est un gros morceau... Wink

Dès que j'aurai passé cette étape je reviendrai sur les fonctions du Grid qui sont très alléchantes.
J'ai déjà ma petite idée comme je t'ai expliqué mais je n'ai pas encore testé le résultat. drunken

Y a-t-il une possibilité de lignes et colonnes fixes avec l'aspect 'bouton' des cellules comme le grid de panoramic ?

BRAVO et MERCI pour ton travail Klaus. On ne se lassera jamais assez de te le dire ! cheers
Revenir en haut Aller en bas
http://gpp.panoramic.free.fr
Klaus

Klaus


Nombre de messages : 12298
Age : 75
Localisation : Ile de France
Date d'inscription : 29/12/2009

Exemple d'une nouvelle version d'un GRID Empty
MessageSujet: Re: Exemple d'une nouvelle version d'un GRID   Exemple d'une nouvelle version d'un GRID EmptyMar 17 Avr 2018 - 19:38

Citation :
Y a-t-il une possibilité de lignes et colonnes fixes
Non, pas dans le sens que c'est utilisé en Panoramic. Mais tu peux définir autant de plages de lignes et/ou plages de colonnes qui sont "inactives", c'est-à dire qui ne réagissent pas à un clic (n'envoient pas de USER_EVENT). Et ces plages de lignes ou colonnes ne se situent pas forcément contre les bords hauts et gauches, mais où tu veux.

Citation :
avec l'aspect 'bouton' des cellules comme le grid de panoramic ?
Je n'ai pas prévu ce type d'aspect. Par contre, tu peux donner n'importe quelle couleur à n'importe quel rectangle de cellules, et bien sûr aux lignes ou colnnes inactives. Tu vois le résultat dans l'exemple facture ci-dessus.

Je suis actuellement en train de réfléchir sur le dessin des bordures des cellules. Actuellement, chaque cellule a une bordure noire de 1 pixel. Je permettrai de changer l'épaisseur (même zéro !) et de donner la couleur de la bordure. Je vais voir si un aspect 3D peut être intégré à cette technique.

As-tu vu le très gros morceau du calcul automatique façon tableur, et la possibilité d'envoyer des données dans des cellules d'autres objets KGFGrid, pouvant à leur tour déclencher des calculs autimatiques dans ces KGFGrid externes ?
Revenir en haut Aller en bas
http://klauspanoramic.comxa.com/index.html
Klaus

Klaus


Nombre de messages : 12298
Age : 75
Localisation : Ile de France
Date d'inscription : 29/12/2009

Exemple d'une nouvelle version d'un GRID Empty
MessageSujet: Re: Exemple d'une nouvelle version d'un GRID   Exemple d'une nouvelle version d'un GRID EmptyMer 18 Avr 2018 - 1:50

Nouvelle version de KGFGrid: on peut maintenant choisir, pour un rectangle de cellules:
- le style de cellule: plat ou 3D (défaut: plat)
- la couleur de la bordure si le style est plat (défaut: noir)
- l'épaisseur des 4 bordures (0 signifiant "bordure absente") (défaut: 1,1,1,1)

Ceci se fait par les fonctions suivantes:
Code:
res% = dll_call6("SetKGFGridCellRangeBorderStyle",KG%,lig1%,lig2%,col1%,col2%,style%)  : ' style%: 0=plat  1=3D
res% = dll_call6("SetKGFGridCellRangeBorderColor",KG%,lig1%,lig2%,col1%,col2%,RGB%)  : ' RGB%: couleur des bordures si style=0
   ' RGB% = hex("BBGGRR")
res% = dll_call6("SetKGFGridCellRangeBorderWidth",KG%,lig1%,lig2%,col1%,col2%,LTRB%)  : ' largeurs des bordures si style=0
   ' LTRB% = hex("BBRRTTLL")  si un des éléments est FF, la valeur est inchangée
   ' exemple: hex("01FF0004") signifie "côté bas de 1 pixel, côté droit inchangé, côté haut absent, côté gauche 4 pixels"

La nouvelle version est disponible sur mon WebDav dossier DLLs et sur les deux sites internet.

Finalement, le dessin des bordures, même en 3D, était plus facile que ce que j'imaginais. Voici une démo qui utilise le style 3D pour la ligne de titres, et les bordures bleues pour la colonne des quantités, avec les bords verticaux plus épais:
Code:
' test_KGFGrid_facture.bas

label UserEvent
dim res%, KG%, KGtot%, f1$, Types$(6), v$, f, img$
  Types$(0) = "Inconnu (traité comme Integer)"
  Types$(1) = "Chaîne"
  Types$(2) = "Entier"
  Types$(3) = "Flottant"
  Types$(4) = "Booléen"
  Types$(5) = "Image"
  Types$(6) = "Mémo"
 
  full_space 0
dll_on "KGF.dll"

KG% = dll_call2("CreateKGFGrid",handle(0),13)                   
' res% = dll_call5("LocateKGFGrid",KG%,10,100,652,377)  : ' si l'on rend la ligne 15 visible           
res% = dll_call5("LocateKGFGrid",KG%,10,100,652,352)  : ' si la ligne 15 est invisible           
KGtot% = dll_call2("CreateKGFGrid",handle(0),13)                   
res% = dll_call5("LocateKGFGrid",KGtot%,10,490,652,27)             
' colonnes:
'  Libellé, quantité, Prix unitaire HT, total HT, taux TVA, total TTC
res% = dll_call5("SetGlobalKGFGridDimensions",KG%,15,7,50,25)   
res% = dll_call4("SetKGFGridColumnRangeVisible",KG%,7,7,0)    : ' servira pour les liens vers une autre table
res% = dll_call4("SetKGFGridRowRangeVisible",KG%,15,15,0)     
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,14,1,6,hex("FFFFFF"))
res% = dll_call5("SetGlobalKGFGridDimensions",KGtot%,1,7,50,25)   
res% = dll_call4("SetKGFGridColumnRangeVisible",KGtot%,7,7,0)    : ' servira pour les liens vers une autre table
res% = dll_call6("SetKGFGridCellRangeColor",KGtot%,1,11,1,6,hex("C0C0FF"))
v$ = "Arial"
res% = dll_call6("SetKGFGridCellRangeFontName",KG%,1,15,1,6,adr(v$))
res% = dll_call6("SetKGFGridCellRangeFontSize",KG%,1,15,1,6,12)   
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,1,15,1,6,2)
res% = dll_call6("SetKGFGridCellRangeJustification",KG%,1,15,2,6,7)
res% = dll_call6("SetKGFGridCellRangeFontName",KGtot%,1,1,1,6,adr(v$))
res% = dll_call6("SetKGFGridCellRangeFontSize",KGtot%,1,1,1,6,12)   
res% = dll_call6("SetKGFGridCellRangeJustification",KGtot%,1,1,1,6,2)
res% = dll_call6("SetKGFGridCellRangeJustification",KGtot%,1,1,2,6,7)

res% = dll_call6("SetKGFGridCellRangeType",KG%,1,1,1,6,1)      : ' ligne des titres de colonnes
res% = dll_call6("SetKGFGridCellRangeBorderStyle",KG%,1,1,1,6,1)
res% = dll_call6("SetKGFGridCellRangeFontBold",KG%,1,1,1,6,1)
res% = dll_call6("SetKGFGridCellRangeActive",KG%,1,1,1,6,0)
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,1,1,200)    : ' libellé
res% = dll_call4("SetKGFGridColumnRangeWidth",KGtot%,1,1,200)   
v$ = "Libellé"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,1,1,1,1,adr(v$)) 
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,2,2,80)      : ' quantité
res% = dll_call4("SetKGFGridColumnRangeWidth",KGtot%,2,2,80)   
v$ = "Qté"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,1,1,2,2,adr(v$))
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,3,3,100)    : ' prix unitaire
res% = dll_call4("SetKGFGridColumnRangeWidth",KGtot%,3,3,100)   
v$ = "Prix U."
res% = dll_call6("SetKGFGridCellRangeValue",KG%,1,1,3,3,adr(v$)) 
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,4,4,100)    : ' total HT
res% = dll_call4("SetKGFGridColumnRangeWidth",KGtot%,4,4,100)   
v$ = "Total HT"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,1,1,4,4,adr(v$)) 
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,5,5,70)      : ' taux TVA
res% = dll_call4("SetKGFGridColumnRangeWidth",KGtot%,5,5,70)   
v$ = "Tx TVA"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,1,1,5,5,adr(v$)) 
res% = dll_call4("SetKGFGridColumnRangeWidth",KG%,6,6,100)      : ' total TTC
res% = dll_call4("SetKGFGridColumnRangeWidth",KGtot%,6,6,100)   
v$ = "Total TTC"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,1,1,6,6,adr(v$)) 

res% = dll_call6("SetKGFGridCellRangeType",KG%,2,15,1,1,1)      : ' colonne des libéllées
res% = dll_call6("SetKGFGridCellRangeType",KG%,2,15,2,7,3)      : ' colonnes de valeurs
res% = dll_call6("SetKGFGridCellRangeBorderColor",KG%,2,15,2,2,hex("FF0000"))  : ' colonne des quantités: bordures bleues
res% = dll_call6("SetKGFGridCellRangeBorderWidth",KG%,2,15,2,2,hex("FF03FF03"))  : ' largeurs des bordures colonne des quantités
res% = dll_call6("SetKGFGridCellRangeZeroAsSpace",KG%,2,15,2,7,1)    : ' ne pas afficher les valeurs zéro
res% = dll_call6("SetKGFGridCellRangeType",KGtot%,1,1,1,1,1)      : ' colonne des libéllées
res% = dll_call6("SetKGFGridCellRangeType",KGtot%,1,1,2,7,3)      : ' colonnes de valeurs

res% = dll_call6("SetKGFGridCellRangeActive",KG%,15,15,1,6,0)  : ' ligne des totaux
res% = dll_call6("SetKGFGridCellRangeActive",KGtot%,1,11,1,6,0)  : ' ligne des totaux
v$ = "Total"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,15,15,1,1,adr(v$))
res% = dll_call6("SetKGFGridCellRangeActive",KGtot%,1,11,1,6,0)  : ' ligne des totaux
res% = dll_call6("SetKGFGridCellRangeValue",KGtot%,1,1,1,1,adr(v$))

f1$ = "$RyC2^$RyC3^*;"                                          : ' calcul du HT par ligne
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,2,14,4,4,adr(f1$))
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,14,4,4,hex("C0C0FF"))

f1$ = "$RyC4^$RyC5^V100^+*V100^/;"                              : ' calcul du TTC par ligne
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,2,14,6,6,adr(f1$))
res% = dll_call6("SetKGFGridCellRangeColor",KG%,2,14,6,6,hex("C0C0FF"))

f1$ = "cR2C2|cR14C2|RScR1C2^V"+str$(KGtot%)+"^@;"                                        : ' calcul du nombre d'unités
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,15,15,2,2,adr(f1$))

f1$ = "cR2C4|cR14C4|RScR1C4^V"+str$(KGtot%)+"^@;"                                        : ' calcul du total HT
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,15,15,4,4,adr(f1$))

f1$ = "cR2C6|cR14C6|RScR1C6^V"+str$(KGtot%)+"^@;"                                        : ' calcul du total TTC
res% = dll_call6("SetKGFGridCellRangeFormula",KG%,15,15,6,6,adr(f1$))

v$ = "Robinets de lavabo"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,1,1,adr(v$)) : ' chargement 1er produit
f = 3
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,2,2,adr(f))
f = 17.5
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,3,3,adr(f))
f = 20
res% = dll_call6("SetKGFGridCellRangeValue",KG%,2,2,5,5,adr(f))
 
v$ = "Parquet chêne"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,1,1,adr(v$)) : ' chargement 2ème produit
f = 2.5
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,2,2,adr(f)) 
f = 50
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,3,3,adr(f)) 
f = 20
res% = dll_call6("SetKGFGridCellRangeValue",KG%,3,3,5,5,adr(f))

v$ = "Raccords cuivre"
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,1,1,adr(v$)) : ' chargement 3ème produit
f = 12
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,2,2,adr(f)) 
f = 2.5
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,3,3,adr(f)) 
f = 10
res% = dll_call6("SetKGFGridCellRangeValue",KG%,4,4,5,5,adr(f))


on_user_event UserEvent

end

UserEvent:
  UserEvent()
  return
 
sub UserEvent()
  dim_local lig%, col%, id%, type%, res$, f
  if bin_and(user_event_wparam,hex("FF000000"))<>hex("0C000000") then exit_sub
  if bin_and(user_event_wparam,hex("00FF0000"))<>hex("00010000") then exit_sub
  id% = bin_and(user_event_wparam,hex("0000FFFF"))
  col% = user_event_lparam/65536
  lig% = bin_and(user_event_lparam,hex("0000FFFF"))
'  delete 1
'  picture 1 : top 1,100 : left 1,420 : width 1,150 : height 1,150 : stretch_on 1
'  clear 2
  type% = dll_call3("GetKGFGridCellType",KG%,lig%,col%)              : ' ok
  select type%
    case 0: ' Inconnu
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      res$ = str$(res%)
    case 1: ' Chaîne
      res$ = string$(255," ")
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(res$)) : ' ok
      res$ = trim$(res$)
    case 2: ' Entier
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      res$ = str$(res%)
    case 3: ' flottant
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,adr(f))    : ' ok
      res$ = str$(f)
    case 4: ' Booleen
      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
      res$ = str$(res%)
    case 5: ' Image
'      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,0)        : ' ok
'      clipboard_paste 1
    case 6: ' Mémo
'      res% = dll_call4("GetKGFGridCellValue",KG%,lig%,col%,handle(2)) : ' ok
  end_select
  message "clic dans KGFGrid  ID="+str$(id%)+" en ligne "+str$(lig%)+" colonne "+str$(col%)+chr$(13)+chr$(10)+"Type="+Types$(type%)+"  valeur="+res$
  if type%=4
    res% = dll_call6("SetKGFGridCellRangeValue",KG%,lig%,lig%,col%,col%,1-res%)        : ' ok
  end_if
end_sub


et le résultat:
Exemple d'une nouvelle version d'un GRID Aa179
Revenir en haut Aller en bas
http://klauspanoramic.comxa.com/index.html
Minibug

Minibug


Nombre de messages : 4566
Age : 57
Localisation : Vienne (86)
Date d'inscription : 09/02/2012

Exemple d'une nouvelle version d'un GRID Empty
MessageSujet: Re: Exemple d'une nouvelle version d'un GRID   Exemple d'une nouvelle version d'un GRID EmptyMer 18 Avr 2018 - 7:11

Super ! Merci Klaus. Wink

Je vois que tu avances beaucoup plus vite que moi... geek
Revenir en haut Aller en bas
http://gpp.panoramic.free.fr
Contenu sponsorisé





Exemple d'une nouvelle version d'un GRID Empty
MessageSujet: Re: Exemple d'une nouvelle version d'un GRID   Exemple d'une nouvelle version d'un GRID Empty

Revenir en haut Aller en bas
 
Exemple d'une nouvelle version d'un GRID
Revenir en haut 
Page 1 sur 3Aller à la page : 1, 2, 3  Suivant
 Sujets similaires
-
» Nouvelle version 0.31
» PANORAMIC V 0.9.22 est disponible
» nouvelle version
» Version instantanée du 8 février 2013 : PANORAMIC V 0.9.24i8
» Version instantanée du 14 décembre 2013 PANORAMIC V 0.9.25i6

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC :: PANORAMIC :: Vos sources, vos utilitaires à partager-
Sauter vers: