ven. 03 mai 2013, 22h39
Gregory
atoutfox.public.association
Re: Création d'un formulaire
> La case à cocher n'apparait pas dans la grille lors de l’exécution
(1) il faut des lignes pour les voir
Dans form load
function load && form
create cursor pp;
( pp1 L, ;
pp2 c(20), ;
pp3 c(10) ;
)
insert into pp values (.f., '1', '11')
insert into pp values (.t., '2', '21')
go top
endfunc
(2) Si tu veux voir la case a cocher dans toutes les lignes
DEFINE CLASS ColCheck as Column
WIDTH = 50
sparse = .f. && ajouter ceci
ADD OBJECT chk1 AS checkbox
ENDDEFINE
______
Gregory
______
"a.mahalla" wrote in message news:km169a$2qra$1@news.niouzes.net...
Bonsoir,
Je m'essaie de créer un formulaire, une grille par programmation.
Je crée le formulaire, j'y une grille. J'ajoute à la grille
3 colonnes. J'ajoute à la première colonne une case à cocher, à
la 2° et 3° un textBox.
La case à cocher n'apparait pas dans la grille lors de l’exécution
du formulaire.Voici le code du programme
oform =CREATEOBJECT("forme1")
oform.grid1.column1.header1.caption = ""
oform.grid1.column2.header1.caption = "2° Colonne"
oform.grid1.column2.header1.alignment = 2
oform.grid1.column3.header1.caption = "3° Colonne"
oform.grid1.column3.header1.alignment = 2
oform.show(1)
DEFINE CLASS forme1 AS form
Width = 530
Height = 250
ADD OBJECT Grid1 as grille
ENDDEFINE
DEFINE CLASS grille as grid
top = 50
width = 450
ADD OBJECT column1 as ColCheck
ADD OBJECT column2 as ColTexte
ADD OBJECT column3 as ColTexte
ENDDEFINE
DEFINE CLASS ColCheck as Column
WIDTH = 50
ADD OBJECT chk1 AS checkbox
ENDDEFINE
DEFINE CLASS ColTexte as Column
width = 200
ADD OBJECT text1 AS textbox
ENDDEFINE
Que manque t il??
Merci pour toute aide.Bonne fin de soirée.
A.MAHALLA
Permalink : http://www.atoutfox.org/nntp.asp?ID=0000011890