
Cheers!
Chris.
hahahaelectrochrisso wrote:Hey Chris what have you done, when I run ProGUI, smoke starts pissing out of my computer.![]()
Only joking.![]()
Only tried the examples so far, but all seems to be ok here.
Code: Select all
#Window_main = 0
#Gadget_main_SideBar = 1
#Gadget_main_SB_Klasse = 2
#MenuBar_main = 3
#MenuBar_main_exit = 4
#ToolBar_main = 5
#ReBar_main = 6
StartProGUI("", 0, 0, 0, 0, 0, 0, 0)
Procedure.l Window_Main()
If OpenWindow(#Window_main, 0, 0, 540, 400," Test",#PB_Window_SystemMenu|#PB_Window_SizeGadget|#True|#PB_Window_MinimizeGadget|#PB_Window_Invisible)
HMId = CreateMenuEx(#MenuBar_main, WindowID(#Window_main), #UISTYLE_OFFICE2007)
If HMId
SetUIColourMode(#UICOLOURMODE_DEFAULT_BLUE)
MenuTitleEx("File")
MenuItemEx(#MenuBar_main_exit,"Exit",#Null, #Null, #Null, #Null)
EndIf
TBId = CreateToolBarEx(#ToolBar_main, WindowID(#Window_main), 32, 32, #UISTYLE_OFFICE2007) ;{ GadgetID(#Gadget_main_Toolbar)
If TBId
ToolBarSeparatorEx()
EndIf
CreateRebar(#ReBar_main, WindowID(#Window_main), #False, #RBS_VARHEIGHT | #RBS_BANDBORDERS, #False)
AddRebarGadget(HMId, "", 530, 0, 0, 0, #RBBS_BREAK|#RBBS_USECHEVRON|#RBBS_NOGRIPPER)
AddRebarGadget(TBId, "", 530, 0, 0, 0, #RBBS_BREAK|#RBBS_USECHEVRON|#RBBS_NOGRIPPER)
ContainerGadget(#Gadget_main_SideBar, 1, 0, 180, 399, #PB_Container_Single)
TextControlEx(GadgetID(#Gadget_main_SideBar), #Gadget_main_SB_Klasse, 0, 0, 180, 20, " Text", #TCX_BK_GRADIENT|#TCX_TRANSPARENT)
CloseGadgetList()
HideWindow(#Window_main,0)
ProcedureReturn WindowID(#Window_main)
EndIf
EndProcedure
If Window_Main()
quitWindow=0
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
If EventWindow()=#Window_main
quitWindow=1
EndIf
EndSelect
Until quitWindow
EndIf
Code: Select all
#Window_main = 0
#Gadget_main_SideBar = 1
#Gadget_main_SB_Klasse = 2
#MenuBar_main = 3
#MenuBar_main_exit = 4
#ToolBar_main = 5
#ReBar_main = 6
StartProGUI("", 0, 0, 0, 0, 0, 0, 0)
Procedure.l Window_Main()
If OpenWindow(#Window_main, 0, 0, 540, 400," Test",#PB_Window_SystemMenu|#PB_Window_SizeGadget|#True|#PB_Window_MinimizeGadget|#PB_Window_Invisible)
HMId = CreateMenuEx(#MenuBar_main, WindowID(#Window_main), #UISTYLE_OFFICE2007)
If HMId
SetUIColourMode(#UICOLOURMODE_DEFAULT_BLUE)
MenuTitleEx("File")
MenuItemEx(#MenuBar_main_exit,"Exit",#Null, #Null, #Null, #Null)
EndIf
TBId = CreateToolBarEx(#ToolBar_main, WindowID(#Window_main), 32, 32, #UISTYLE_OFFICE2007) ;{ GadgetID(#Gadget_main_Toolbar)
If TBId
ToolBarSeparatorEx()
EndIf
CreateRebar(#ReBar_main, WindowID(#Window_main), #False, #RBS_VARHEIGHT | #RBS_BANDBORDERS, #False)
AddRebarGadget(HMId, "", 530, 0, 0, 0, #RBBS_BREAK|#RBBS_USECHEVRON|#RBBS_NOGRIPPER)
AddRebarGadget(TBId, "", 530, 0, 0, 0, #RBBS_BREAK|#RBBS_USECHEVRON|#RBBS_NOGRIPPER)
ContainerGadget(#Gadget_main_SideBar, 1, 0, 180, 399, #PB_Container_Single)
CloseGadgetList()
TextControlEx(GadgetID(#Gadget_main_SideBar), #Gadget_main_SB_Klasse, 0, 0, 180, 20, " Text", #TCX_BK_GRADIENT|#TCX_TRANSPARENT)
EndIf
EndProcedure
If Window_Main()
quitWindow=0
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
If EventWindow()=#Window_main
quitWindow=1
EndIf
EndSelect
Until quitWindow
EndIf
The code works for one year without any problem. If I compile the same code with ProGUI for PB 4.51 there are no problems.Zach wrote:I had a feeling it was the code too, and I played around with it a bit... but I couldn't figure it out myself
I've forgot to insert the ProcedureReturn in the example, but it's in the original code.Poshu wrote:@Thorsten1867
Fixed your bug ;D (your code still won't work cause your procedure never return #true, but it's not related to progui whatsoever)
Code: Select all
#Window_main = 0
#Gadget_main_SideBar = 1
#Gadget_main_SB_Klasse = 2
#MenuBar_main = 3
#MenuBar_main_exit = 4
#ToolBar_main = 5
#ReBar_main = 6
StartProGUI("", 0, 0, 0, 0, 0, 0, 0)
Procedure.l Window_Main()
If OpenWindow(#Window_main, 0, 0, 540, 400," Test",#PB_Window_SystemMenu|#PB_Window_SizeGadget|#True|#PB_Window_MinimizeGadget|#PB_Window_Invisible)
HMId = CreateMenuEx(#MenuBar_main, WindowID(#Window_main), #UISTYLE_OFFICE2007)
If HMId
SetUIColourMode(#UICOLOURMODE_DEFAULT_BLUE)
MenuTitleEx("File")
MenuItemEx(#MenuBar_main_exit,"Exit",#Null, #Null, #Null, #Null)
EndIf
TBId = CreateToolBarEx(#ToolBar_main, WindowID(#Window_main), 32, 32, #UISTYLE_OFFICE2007) ;{ GadgetID(#Gadget_main_Toolbar)
If TBId
ToolBarSeparatorEx()
EndIf
CreateRebar(#ReBar_main, WindowID(#Window_main), #False, #RBS_VARHEIGHT | #RBS_BANDBORDERS, #False)
AddRebarGadget(HMId, "", 530, 0, 0, 0, #RBBS_BREAK|#RBBS_USECHEVRON|#RBBS_NOGRIPPER)
AddRebarGadget(TBId, "", 530, 0, 0, 0, #RBBS_BREAK|#RBBS_USECHEVRON|#RBBS_NOGRIPPER)
ContainerGadget(#Gadget_main_SideBar, 1, 0, 180, 399, #PB_Container_Single)
CloseGadgetList()
TextControlEx(GadgetID(#Gadget_main_SideBar), #Gadget_main_SB_Klasse, 0, 0, 180, 20, " Text", #TCX_BK_GRADIENT|#TCX_TRANSPARENT)
HideWindow(#Window_main,0)
ProcedureReturn WindowID(#Window_main)
EndIf
EndProcedure
If Window_Main()
quitWindow=0
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
If EventWindow()=#Window_main
quitWindow=1
EndIf
EndSelect
Until quitWindow
EndIf
Code: Select all
.....
ContainerGadget(#Gadget_main_SideBar, 1, OffsetY, SidebarWidth, InnerHight-1, #PB_Container_Single)
ypos = 0
TextControlEx(GadgetID(#Gadget_main_SideBar), #Gadget_main_SB_Klasse, 0, ypos, SidebarWidth, 20, " Klassen", #TCX_BK_GRADIENT|#TCX_TRANSPARENT)
TextGadget(#Gadget_main_T_SJ, 15, ypos+34, 60, 16, "Schuljahr:")
SetGadgetFont(#Gadget_main_T_SJ,FontID(#Font_Arial9))
ComboBoxGadget(#Gadget_main_CB_SJ, 78, ypos+31, 87, 21)
ListViewGadget(#Gadget_main_L_KL, 15, ypos+61, 120, 79)
SetGadgetFont(#Gadget_main_L_KL, FontID(#Font_Arial10))
SetGadgetColor(#Gadget_main_L_KL, #PB_Gadget_FrontColor, RGB($0,$0,$80))
ButtonImageGadget(#Gadget_main_B_KLNew,140,ypos+60,25,25,ImageID(#Image_B_Add))
GadgetToolTip(#Gadget_main_B_KLNew, "Neue Klasse (aktuelles Schuljahr)")
ButtonImageGadget(#Gadget_main_B_KLEdit,140,ypos+88,25,25,ImageID(#Image_B_Edit))
GadgetToolTip(#Gadget_main_B_KLEdit, "Daten der Klasse bearbeiten")
ButtonImageGadget(#Gadget_main_B_KLOpen, 140, ypos+116, 25, 25,ImageID(#Image_B_OK))
GadgetToolTip(#Gadget_main_B_KLOpen, "Ausgewählte Klasse öffnen")
ypos + 151
TextControlEx(GadgetID(#Gadget_main_SideBar), #Gadget_main_SB_Beobachtung, 0, ypos, SidebarWidth, 20, " Beobachtungen", #TCX_BK_GRADIENT|#TCX_TRANSPARENT)
ComboBoxGadget(#Gadget_main_CB_Beobachtung, 15, ypos+31, 120, 21)
ComboBoxGadget(#Gadget_main_CB_Auswahl, 15, ypos+60, 120, 21)
ButtonImageGadget(#Gadget_main_B_SBNeu, 140, ypos+29, 25, 25, ImageID(#Image_B_Add))
GadgetToolTip(#Gadget_main_B_SBNeu, "Neue Beobachtung eingeben")
ButtonImageGadget(#Gadget_main_B_SBOpen, 140, ypos+58, 25, 25, ImageID(#Image_B_OK)) ; ImageID(#Image_ZG_B_SBeob)
GadgetToolTip(#Gadget_main_B_SBOpen, "Ausgewählte Beobachtungen aufrufen")
ypos + 93
TextControlEx(GadgetID(#Gadget_main_SideBar), #Gadget_main_SB_PA, 0, ypos, SidebarWidth, 20, " Notenverwaltung", #TCX_BK_GRADIENT|#TCX_TRANSPARENT)
ComboBoxGadget(#Gadget_main_CB_Fach,15,ypos+31,120,21)
ComboBoxGadget(#Gadget_main_CB_Bereich,15,ypos+60,120,21)
ButtonImageGadget(#Gadget_main_B_PANeu,140,ypos+29,25,25,ImageID(#Image_B_Add))
GadgetToolTip(#Gadget_main_B_PANeu, "Neue Probe anlegen und Noten eingeben")
ButtonImageGadget(#Gadget_main_B_Proben,140,ypos+58,25,25,ImageID(#Image_B_OK)) ; ImageID(#Image_B_Proben)
GadgetToolTip(#Gadget_main_B_Proben, "Probenverwaltung mit ausgewähltem Fach aufrufen")
ypos + 93
TextControlEx(GadgetID(#Gadget_main_SideBar), #Gadget_main_SB_Zeugnis, 0, ypos, SidebarWidth, 20, " Zeugnisse", #TCX_BK_GRADIENT|#TCX_TRANSPARENT)
ListViewGadget(#Gadget_main_L_ZG,15,ypos+31,120,77)
SetGadgetFont(#Gadget_main_L_ZG, FontID(#Font_Arial10))
SetGadgetColor(#Gadget_main_L_ZG, #PB_Gadget_FrontColor, RGB($0,$0,$80))
ButtonImageGadget(#Gadget_main_B_ZGNeu,140,ypos+30,25,25,ImageID(#Image_B_Add))
GadgetToolTip(#Gadget_main_B_ZGNeu, "Neues Zeugnis erstellen")
ButtonImageGadget(#Gadget_main_B_ZGShow,140,ypos+57,25,25,ImageID(#Image_B_ShowZG))
GadgetToolTip(#Gadget_main_B_ZGShow, "Zeugnisse anzeigen/drucken")
ButtonImageGadget(#Gadget_main_B_ZGEdit,140,ypos+84,25,25,ImageID(#Image_B_OK))
GadgetToolTip(#Gadget_main_B_ZGEdit, "Zeugnis zum Bearbeiten öffnen")
CloseGadgetList()
.....
Code: Select all
ContainerGadget(#Gadget_main_SideBar, 1, 0, 180, 399, #PB_Container_Single)
TextControlEx(GadgetID(#Gadget_main_SideBar), #Gadget_main_SB_Klasse, 0, 0, 180, 20, " Text", #TCX_BK_GRADIENT|#TCX_TRANSPARENT)
UseGadgetList(GadgetID(#Gadget_main_SideBar))
; more gadgets here
CloseGadgetList()
Thanks mate! good to hear from you too!Poshu wrote:Wow, I just spent a few month away from my comp and progui is looking better than ever °_°; woohooh!
PrincieD wrote:however the previous gadget list doesn't get restored because there is no way to tell what it was previously outside of ProGUI.
Code: Select all
oldgadgetlist = UseGadgetList(0)
Oh yep that would work lol thanks Thomasts-soft wrote:Code: Select all
oldgadgetlist = UseGadgetList(0)