[RESOLU] Mon TextGadget ne s'affiche pas !

Vous débutez et vous avez besoin d'aide ? N'hésitez pas à poser vos questions
Avatar de l’utilisateur
omega
Messages : 633
Inscription : sam. 26/nov./2011 13:04
Localisation : Alger

[RESOLU] Mon TextGadget ne s'affiche pas !

Message par omega »

Bonsoir à tous

Je ne comprends pas pourquoi mon TextGadget ne s'affiche pas ?

Code : Tout sélectionner

Enumeration
#wincb
#Printcb_txtchaine
#Printcb_chaine
#Printcb
EndEnumeration

If OpenWindow(#wincb,0,0,480,200,"Edition des codes barres",#PB_Window_SystemMenu |   #PB_Window_SizeGadget)
  SetWindowColor(#wincb,RGB(255, 255, 255)) 
  If CreateGadgetList(WindowID(#wincb))
    TextGadget(#Printcb_txtchaine,20,10,90,20,"Code barre >>")
    StringGadget(#Printcb_chaine,120,10,100,20,"fdsdfdf")
    ImageGadget(1,15,50,150,20,0)
  EndIf
  wrow=10
  wcol=230
  ButtonGadget(#Printcb,wcol,wrow,110,30,"Imprimer (#F2)")
EndIf

exitPrintCb=0

Repeat
EventId=WaitWindowEvent()
If EventID = #PB_Event_CloseWindow
   exitPrintCb=1
EndIf
Until exitPrintCb=1
End
Merci
Dernière modification par omega le ven. 11/août/2017 20:39, modifié 1 fois.
Win7 (x64) 64 bits Pb 5.72
Avatar de l’utilisateur
microdevweb
Messages : 1802
Inscription : mer. 29/juin/2011 14:11
Localisation : Belgique

Re: Mon TextGadget ne s'affiche pas !

Message par microdevweb »

Bonjour,

Parceque

Code : Tout sélectionner

ImageGadget(1,15,50,150,20,0)
#Printcb_txtchaine ; dans l'énumération vaut 1
Comme ceci ça fonctionne

Code : Tout sélectionner

Enumeration
#wincb
#Printcb_txtchaine
#Printcb_chaine
#Printcb
#Image
EndEnumeration

If OpenWindow(#wincb,0,0,480,200,"Edition des codes barres",#PB_Window_SystemMenu |   #PB_Window_SizeGadget)
  SetWindowColor(#wincb,RGB(255, 255, 255)) 
  If CreateGadgetList(WindowID(#wincb))
    TextGadget(#Printcb_txtchaine,20,10,90,20,"Code barre >>")
    StringGadget(#Printcb_chaine,120,10,100,20,"fdsdfdf")
    ImageGadget(#Image,15,50,150,20,0)
  EndIf
  wrow=10
  wcol=230
  ButtonGadget(#Printcb,wcol,wrow,110,30,"Imprimer (#F2)")
EndIf

exitPrintCb=0

Repeat
EventId=WaitWindowEvent()
If EventID = #PB_Event_CloseWindow
   exitPrintCb=1
EndIf
Until exitPrintCb=1
End
Windows 10 64 bits PB: 5.70 ; 5.72 LST
Work at Centre Spatial de Liège
Avatar de l’utilisateur
omega
Messages : 633
Inscription : sam. 26/nov./2011 13:04
Localisation : Alger

Re: Mon TextGadget ne s'affiche pas !

Message par omega »

Merci beaucoup MicroDevWeb

(D'où, il vaut mieux s'habituer à utiliser des noms de constantes au lieu de caractères numériques)

Grand merci pour ton aide
Win7 (x64) 64 bits Pb 5.72
Répondre