Panelgadget et onglet

Vous débutez et vous avez besoin d'aide ? N'hésitez pas à poser vos questions
fd
Messages : 70
Inscription : mar. 15/mars/2005 21:41
Localisation : Savoie

Panelgadget et onglet

Message par fd »

Bonjour,

J'ai besoin de détecter le changement d'onglet (celui qui devient actif) dans un panel gadget pour modifier un menu déroulant associé à chaque onglet. Comme détecter le changement d'onglet ?
Merci de votre aide.
Avatar de l’utilisateur
venom
Messages : 3138
Inscription : jeu. 29/juil./2004 16:33
Localisation : Klyntar
Contact :

Message par venom »

salut fd

pour la détection d'onglet voici un petit code vite fait :wink:

Code : Tout sélectionner

;- Window Constants
Enumeration
  #Window_0
EndEnumeration

;- Gadget Constants
Enumeration
  #Panel_0
EndEnumeration

  If OpenWindow(#Window_0, 216, 0, 600, 300, "New window ( 0 )",  #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar )
    If CreateGadgetList(WindowID(#Window_0))
     
      ;- Panel0
      PanelGadget(#Panel_0, 15, 5, 360, 285)
      AddGadgetItem(#Panel_0, -1, "Tab 0")
      AddGadgetItem(#Panel_0, -1, "Tab 1")
      AddGadgetItem(#Panel_0, -1, "Tab 2")
      AddGadgetItem(#Panel_0, -1, "Tab 3")
      AddGadgetItem(#Panel_0, -1, "Tab 4")
      CloseGadgetList()
     
    EndIf
  EndIf

  Repeat
   EventID = WaitWindowEvent()
    If EventID = #PB_Event_Gadget
      Select EventGadget()
     
       Case #Panel_0
        Debug GetGadgetState(#Panel_0)
     
      EndSelect
    EndIf
  Until EventID = #PB_Event_CloseWindow
mais tu en a plein sur le forum cherche du coté de PanelGadget :wink:


@++
Windows 10 x64, PureBasic 5.73 x86 & x64
GPU : radeon HD6370M, CPU : p6200 2.13Ghz
fd
Messages : 70
Inscription : mar. 15/mars/2005 21:41
Localisation : Savoie

Message par fd »

Merci, je cherchais beaucoup plus compliqué !
Avatar de l’utilisateur
venom
Messages : 3138
Inscription : jeu. 29/juil./2004 16:33
Localisation : Klyntar
Contact :

Message par venom »

précise alors :wink: car je n'est pas bien compris donc ?


@++
Windows 10 x64, PureBasic 5.73 x86 & x64
GPU : radeon HD6370M, CPU : p6200 2.13Ghz
Répondre