Code: Alles auswählen
XIncludeFile "XPSideBar.pbi"
#Window_main = 0
#MenuBar_main = 1
#StatusBar_main = 2
#Gadget_main_Toolbar = 3
#Gadget_main_F_KL = 10
#Gadget_main_T_SJ = 11
#Gadget_main_CB_SJ = 12
#Gadget_main_L_KL = 13
#Gadget_main_B_KLOpen = 14
#Gadget_main_B_KLEdit = 15
; ---------------
#Gadget_main_F_ZG = 16
#Gadget_main_L_ZG = 17
#Gadget_main_B_ZGEdit = 18
#Gadget_main_B_ZGShow = 19
; ---------------
#Gadget_main_F_PA = 20
#Gadget_main_CB_Fach = 21
#Gadget_main_CB_Bereich = 22
#Gadget_main_B_PANeu = 23
#Gadget_main_B_Proben = 24
#Gadget_main_B_NV = 25
#Gadget_main_T_NV = 26
#Gadget_main_F_NV = 27
Procedure.l Window_Main()
If OpenWindow(#Window_main,156,110,740,520," Test",#PB_Window_SystemMenu|#PB_Window_ScreenCentered|#PB_Window_MinimizeGadget|#PB_Window_Invisible)
Brush.LOGBRUSH\lbColor=8404992
SetClassLong_(WindowID(#Window_main),#GCL_HBRBACKGROUND,CreateBrushIndirect_(Brush))
If CreateMenu(#MenuBar_main,WindowID(#Window_main))
MenuTitle("Datei")
EndIf
If CreateStatusBar(#StatusBar_main,WindowID(#Window_main)) ; Statusbar
AddStatusBarField(85)
AddStatusBarField(475)
AddStatusBarField(180)
EndIf
;- --------- SideBar ----------
If InitSidebar(WindowID(#Window_main),3,0,0,32,55)
;{ --- Klassenverwaltung ---
ConKL = AddContainer(110,"Klassen")
UseGadgetList(ConKL)
; Schuljahr
TextGadget(#Gadget_main_T_SJ,18,18,60,16,"Schuljahr:")
SetGadgetColor(#Gadget_main_T_SJ, #PB_Gadget_BackColor, #ContainerBlue)
ComboBoxGadget(#Gadget_main_CB_SJ,80,15,85,100)
; Klassenliste
ListViewGadget(#Gadget_main_L_KL, 15,45,120,50)
SetGadgetColor(#Gadget_main_L_KL, #PB_Gadget_FrontColor, RGB($0,$0,$80))
ButtonGadget(#Gadget_main_B_KLEdit,140,44,25,25,"")
ButtonGadget(#Gadget_main_B_KLOpen,140,71,25,25,"")
Frame3DGadget(#Gadget_main_F_KL,5,0,170,105,"")
;}
;{ --- Notenverwaltung ---
ConNV = AddContainer(130,"Proben / Noten")
UseGadgetList(ConNV)
ComboBoxGadget(#Gadget_main_CB_Fach,15,15,120,100)
ComboBoxGadget(#Gadget_main_CB_Bereich,15,44,120,100)
AddGadgetItem(#Gadget_main_CB_Bereich, 0, "")
SetGadgetState(#Gadget_main_CB_Bereich, 0)
ButtonGadget(#Gadget_main_B_Proben,140,14,25,25,"")
ButtonGadget(#Gadget_main_B_PANeu,140,41,25,25,"")
Frame3DGadget(#Gadget_main_F_PA,5,0,170,75,"")
TextGadget(#Gadget_main_T_NV,15,92,120,21,"",#PB_Text_Center|#PB_Text_Border)
SetGadgetColor(#Gadget_main_T_NV, #PB_Gadget_FrontColor, RGB($0,$0,$80))
ButtonGadget(#Gadget_main_B_NV,140,90,25,25,"")
Frame3DGadget(#Gadget_main_F_NV,5,75,170,50,"")
;}
;{ --- Zeugnisverwaltung ---
ConZG = AddContainer(80,"Zeugnisse")
UseGadgetList(ConZG)
ListViewGadget(#Gadget_main_L_ZG,15,15,120,50)
SetGadgetColor(#Gadget_main_L_ZG, #PB_Gadget_FrontColor, RGB($0,$0,$80))
AddGadgetItem(#Gadget_main_L_ZG,-1,"Zwischenzeugnis")
AddGadgetItem(#Gadget_main_L_ZG,-1,"Übertrittszeugnis")
AddGadgetItem(#Gadget_main_L_ZG,-1,"Jahreszeugnis")
ButtonGadget(#Gadget_main_B_ZGShow,140,14,25,25,"")
ButtonGadget(#Gadget_main_B_ZGEdit,140,41,25,25,"")
Frame3DGadget(#Gadget_main_F_ZG,5,0,170,75,"")
;}
UseGadgetList(WindowID(#Window_main))
EndIf
;- ---------- Gadget's ----------
If CreateGadgetList(WindowID(#Window_main))
ContainerGadget(#Gadget_main_Toolbar,0,0,740,32, #PB_Container_Single)
CloseGadgetList()
EndIf
HideWindow(#Window_main,0)
ProcedureReturn WindowID(#Window_main)
EndIf
EndProcedure
If Window_Main()
quitWindow=0
Repeat
If WaitWindowEvent() = #PB_Event_CloseWindow
If EventWindow()=#Window_main
quitWindow=1
EndIf
EndIf
Until quitWindow
CloseWindow(#Window_main)
EndIf