Page 1 sur 1

[OK] Comment créer l'equivalent d'un Select/option html

Publié : mer. 07/avr./2010 16:34
par Ar-S
Voilà,
Je ne sais pas si je perds la tête ou si ça n'existe pas.

J'aimerai savoir comment avoir le même rendu en PB que ça

Code : Tout sélectionner

<select name="LISTE" size="1" dir="ltr" lang="fr">
  <option>choix 1</option>
  <option>choix 2</option>
  <option>choix 3</option>
</select>
J'ai bien tenté le ListViewgadget mais je n'obtiens pas vraiment quelque chose de sympa.

Code : Tout sélectionner

If OpenWindow(0,0,0,270,140,"ListViewGadget",#PB_Window_SystemMenu|#PB_Window_ScreenCentered) 
  ListViewGadget(0, 15, 20, 110, 18, #PB_ListView_ClickSelect)
  For a=1 To 3
    AddGadgetItem (0,-1,"Choix "+Str(a))
  Next
  Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow
EndIf

Re: Comment créer l'equivalent d'un Select/option html

Publié : mer. 07/avr./2010 16:43
par TazNormand
Une combobox ferait l'affaire, non ?

Code : Tout sélectionner

If OpenWindow(0,0,0,270,140,"ListViewGadget",#PB_Window_SystemMenu|#PB_Window_ScreenCentered) 
  ;ListViewGadget(0, 15, 20, 110, 18, #PB_ListView_ClickSelect)
  ComboBoxGadget(0,15,20,110,18)
	For a=1 To 3
		AddGadgetItem (0,-1,"Choix "+Str(a))
	Next
	Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow
EndIf

Re: Comment créer l'equivalent d'un Select/option html

Publié : mer. 07/avr./2010 17:10
par Ar-S
C'est exactement ça, comme quoi je fatigue parfois..
Merci