Yannick
Nombre de messages : 8635 Age : 53 Localisation : Bretagne Date d'inscription : 15/02/2010
| Sujet: [Text$(N)] Ne récupère pas sur un combo Mar 16 Oct 2012 - 7:48 | |
| | |
|
Jean Claude
Nombre de messages : 5950 Age : 70 Localisation : 83 Var Date d'inscription : 07/05/2009
| Sujet: Re: [Text$(N)] Ne récupère pas sur un combo Mar 16 Oct 2012 - 8:10 | |
| Salut Ygeronimi voir ligne 137 - Code:
-
def_Init() def_Form() end ' ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ ' ¤ INIT ¤ ' ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ Sub def_Init() Init_Constantes() Init_VarGlobales() Create_Dossiers() Create_Fichiers() End_Sub ' ------------------------------------------------------------------------------ Sub Init_Constantes() End_Sub ' ------------------------------------------------------------------------------ Sub Init_VarGlobales() ' Variable pour l'enregistrement d'une case Dim Tab%,CellCol%,CellLig%,T$ End_Sub ' ------------------------------------------------------------------------------ Sub Create_Dossiers() End_Sub ' ------------------------------------------------------------------------------ Sub Create_Fichiers() End_Sub ' ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ ' ¤ INTERFACE ¤ ' ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ Sub def_Form() Formulaire(0,1,"PlaningEcurie",800,500,0,0) Menu(0,1,6) Ss_Menu(8,3,4) Caption_Menu(1,10) Create_Grid(12,10,7,450,400,20,5,0) End_Sub ' ------------------------------------------------------------------------------ ' Création d'un formulaire ' ------------------------------------------------------------------------------ Sub Formulaire(No%,V%,Titre$,W%,H%,T%,L%) if No% > 0 then Form No% If V%=0 then hide No% Command_Target_Is No% Width No%,W% :Height No%,H% if T%=0 :Top No%,(Screen_y-H%)/2 :else :Top No%,T% :end_if if L%=0 :Left No%,(Screen_x-W%)/2:else :Left No%,L%:end_if Font_Name No%,"Times new roman":Font_Size No%,10:Caption No%,Titre$ End_Sub ' ------------------------------------------------------------------------------ ' Création d'un Main_menu ' ------------------------------------------------------------------------------ Sub Menu(No%,Num%,Nbre%) If Label("Clic")=0 Then Label Clic Dim_local x% Command_target_is No% Main_menu Num% For x% =Num%+1 to Num%+Nbre% :Sub_menu x% :Parent x%,Num% :on_click x%,Clic Next x% End_Sub ' ------------------------------------------------------------------------------ ' Création de sous menus dans Main_menu ' ------------------------------------------------------------------------------ Sub Ss_Menu(dep%,Par%,Nbre%) Dim_local x% For x%= dep% to dep%+(Nbre%-1) :Sub_menu x% : Parent x%,Par% :on_click x%,Clic Next x% End_Sub ' ------------------------------------------------------------------------------ ' Attribution des captions du menu ' ------------------------------------------------------------------------------ Sub Caption_Menu(R%,N%) Dim_local M$,x%,def$(N%) Restore Read M$ While M$<>"Menu"+str$(R%) Read M$ End_While For x%=1 to N% :Read def$(x%): caption R%+x%,def$(x%):Next x% End_Sub ' ------------------------------------------------------------------------------ ' Création d'un Grid ' ------------------------------------------------------------------------------ Sub Create_Grid(No%,NbreL%,NbreC%,W%,H%,T%,L%,P%) Dim_Local x%,y% y%=(NbreC%*30)+32+120 x%=((NbreL%+1)*20)+32 Grid No% :Grid_Row No%,NbreL%+1:Grid_Column No%,NbreC%+1 Top No%,T% :Left No%,L% If y%<W% :Width No%,y% :Else:Width No%,W%:End_If If x%<H% :Height No%,x% :Else:Height No%,H%:End_If If P%>0 Then Parent No%,P% Grid_Row_Height No%,20:Grid_Column_Width No%,30 Grid_One_Column_Width No%,1,120:Grid_Write No%,1,1,"Cheval":Color No%,238,230,206 On_Click No%,Clic :Cursor_point No% End_Sub ' ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ ' ¤ MENU PAR CLIC ¤ ' ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ Clic: If Variable("M%")=0 Then Dim M% M%=Number_Click Select M% case 12 Click_Grid(12) case 105 EnrgtCase() End_Select Return ' ------------------------------------------------------------------------------ Sub Click_Grid(No%) Dim_Local x%,y%,lig%,col%,G% y% = mouse_y_left_down(No%) x% = mouse_x_left_down(No%) lig% = grid_y_to_row(No%,y%) col% = grid_x_to_column(No%,x%) G%=No% If col%>1 and lig%>1 Then Modif_Cell(G%,lig%,col%) End_Sub ' ------------------------------------------------------------------------------ Sub Modif_Cell(G%,R%,C%) if object_exists(100)=0 formulaire(100,1,"Modifier",300,200,0,0) Alpha 101:Top 101,5:Left 101,210:Caption 101,Date$ Alpha 102:Top 102,25:Left 102,10:Caption 102,"Xxxxxxxxx" :' Grid_Read$(G%,R%,1) Alpha 103:Top 103,50:Left 103,10:Caption 103,"Activité(s)" Combo 104:Top 104,70:Left 104,30:Width 104,50 item_add 104,"T" Tab%=G% :CellCol%=C% :CellLig%=R% :T$=Text$(104) Button 105:Top 105,130:Left 105,200:Caption 105,"Enregistrer":On_Click 105,Clic Cursor_Point 105 Else Show 100 End_If End_Sub ' ------------------------------------------------------------------------------ Sub EnrgtCase() T$=Text$(104) message "Grid N°: "+str$(Tab%)+chr$(13)+"Cellule : ("+str$(CellLig%)+":"+str$(CellCol%)+")"+chr$(13)+"Texte : "+T$ Grid_Write Tab%,CellLig%,CellCol%,T$ Hide 100 End_Sub ' ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ ' ¤ DATAS MENU ¤ ' ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ Data "Menu1" Data "Effectif" Data "Planning" Data "Transfert" Data "A Propos..." Data "Aide" Data "Quitter" Data "Général" Data "Ecurie" Data "Site Annexe 1" Data "Site Annexe 2"
PS:on s'est croisé | |
|
Yannick
Nombre de messages : 8635 Age : 53 Localisation : Bretagne Date d'inscription : 15/02/2010
| |