ATOUTFOX
COMMUNAUTÉ FRANCOPHONE DES PROFESSIONNELS FOXPRO
Visual FoxPro : le développement durable

Forum AtoutFox : Re: FORM procedure Click une fois   

Sujet

rss Flux RSS des derniers messages

Vous devez vous identifier pour pouvoir poser une question ou répondre.

jeu. 21 novembre 2013, 16h15
sys001
France France

atoutfox.public.association

Re: FORM procedure Click une fois

Merci :
1 - bouton Choix (command1 ... je sais c'est pas propre mais c'est l'ébauche !)
chemin=ALLTRIM(ThisForm.Text2.Value)
affiche=chemin+ALLTRIM(ThisForm.Text1.value)+"*#*.enc"
FICH=LocFile(affiche,"Enc","liste objets de parution")
chemin=LEFT(fich,AT("\",fich,OCCURS("\",fich)))
USE &fich EXCLUSIVE
IF .not. FIELD(7)="POIDS_ELT"
USE encart0 EXCLUSIVE
zap
APPEND FROM &fich
COPY TO &fich TYPE fox2x
ENDIF
USE
nomtitre=alltrim(strtran(fich,chemin,""))
numparu=LEFT(nomtitre,AT("#",nomtitre)-1)
ThisForm.Label1.Caption=alltrim(SUBSTR(FICH,AT("#",fich)+1,LEN(fich)-4-AT("#",fich)))+" n° "+ numparu
ThisForm.Label1.WIDTH=LEN(alltrim(ThisForm.Label1.Caption))*12
ThisForm.TEXT2.VALUE=chemin
ThisForm.Label2.visible= .F.
thisform.text1.Visible= .F.
This.Visible= .F.
ThisForm.Grid1.RecordSource=FICH
ThisForm.Label3.Visible= .T.
ThisForm.Grid1.Refresh
ThisForm.Grid1.Column1.ReadOnly= .T.
ThisForm.Grid1.Column1.WIDTH= 30
ThisForm.Grid1.Column2.ReadOnly= .T.
ThisForm.Grid1.Column3.ReadOnly= .T.
*ThisForm.Grid1.Column4.ReadOnly= .T.
ThisForm.Grid1.Column5.WIDTH= 30
ThisForm.Grid1.Column5.visible= .T.
ThisForm.Grid1.Column6.visible= .F.
ThisForm.Grid1.Column7.WIDTH= 60
ThisForm.Grid1.Column7.ReadOnly= .T.


2 - Grid1.Culumn7.Text1.CLick (et même code pour GotFocus ... au cas où)

IF This.value=0
This.readOnly=.F.
ThisForm.ShowTips=.F.
ELSE
This.ToolTipText="Attention: ne pas changer le poids si 1 cage de cette parution a déjà été validée pour Expédition. Clic=droit pour modifier"
ThisForm.ShowTips=.T.
ENDIF


3 - Grid1.Culumn7.Text1.RightCLick pour déverouiller et modifier même si valeur non nulle :

This.readOnly= .F.


4 - bouton OK (command2) pour changer de table une fois la saisie terminée :

USE
ThisForm.Label1.Caption="NOUVELLE PARUTION"
ThisForm.Label2.visible= .T.
ThisForm.Label1.WIDTH=LEN(alltrim(ThisForm.Label1.Caption))*12

ThisForm.Text1.visible= .T.
ThisForm.Text1.value=""
ThisForm.Label3.visible= .F.
ThisForm.Command1.visible= .T.
ThisForm.Grid1.RecordSource=""


J'ai testé pas mal de différents trucs en variantes mais sans résultats .
Vive le travail collaboratif n'est-ce pas ??
Merci à vous tous,
Sylvain



Permalink : http://www.atoutfox.org/nntp.asp?ID=0000013219
20 286 messages dans le forum • Liste complète des messages

www.atoutfox.org - Site de la Communauté Francophone des Professionnels FoxPro - v3.4.0 - © 2004-2026.
Cette page est générée par un composant COM+ développé en Visual FoxPro 9.0-SP2-HF3