ProGUI V1.38 UI Library (Small Bug Fix)

Developed or developing a new product in PureBasic? Tell the world about it.
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.35 User Interface Library (Important bug fixes

Post by PrincieD »

New version out guys! see top of thread :)

Cheers!

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
Zach
Addict
Addict
Posts: 1675
Joined: Sun Dec 12, 2010 12:36 am
Location: Somewhere in the midwest
Contact:

Re: ProGUI V1.35 User Interface Library (Important bug fixes

Post by Zach »

Everything seems to be working alright so far 8)
User Library installed and running smooth as silk.
Last edited by Zach on Thu May 17, 2012 12:40 am, edited 1 time in total.
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.35 User Interface Library (Important bug fixes

Post by PrincieD »

Good good, that's what I like to hear! :D

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
User avatar
electrochrisso
Addict
Addict
Posts: 989
Joined: Mon May 14, 2007 2:13 am
Location: Darling River

Re: ProGUI V1.35 User Interface Library (Important bug fixes

Post by electrochrisso »

Hey Chris what have you done, when I run ProGUI, smoke starts pissing out of my computer. :shock:
Only joking. :mrgreen:
Only tried the examples so far, but all seems to be ok here. :)
PureBasic! Purely the best 8)
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.35 User Interface Library (Important bug fixes

Post by PrincieD »

electrochrisso wrote:Hey Chris what have you done, when I run ProGUI, smoke starts pissing out of my computer. :shock:
Only joking. :mrgreen:
Only tried the examples so far, but all seems to be ok here. :)
hahaha :lol: I nearly had a heart attack then! :P lol I'm glad it's working well anyway :)

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
User avatar
Thorsten1867
Addict
Addict
Posts: 1372
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: ProGUI V1.35 User Interface Library (Important bug fixes

Post by Thorsten1867 »

After installing the new version of ProGUI (1.34/1.35) my program no longer compiles. ProGUI seems to cause an "CloseGadgetList()" error.

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
Where can I download an older working version of ProGUI?
Last edited by Thorsten1867 on Mon May 21, 2012 2:09 pm, edited 1 time in total.
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
Poshu
Enthusiast
Enthusiast
Posts: 459
Joined: Tue Jan 25, 2005 7:01 pm
Location: Canada

Re: ProGUI V1.35 User Interface Library (Important bug fixes

Post by Poshu »

@Thorsten1867

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
Fixed your bug ;D (your code still won't work cause your procedure never return #true, but it's not related to progui whatsoever)

Wow, I just spent a few month away from my comp and progui is looking better than ever °_°; woohooh!
Zach
Addict
Addict
Posts: 1675
Joined: Sun Dec 12, 2010 12:36 am
Location: Somewhere in the midwest
Contact:

Re: ProGUI V1.35 User Interface Library (Important bug fixes

Post by Zach »

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 :oops:
User avatar
Thorsten1867
Addict
Addict
Posts: 1372
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: ProGUI V1.35 User Interface Library (Important bug fixes

Post by Thorsten1867 »

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 :oops:
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.
(The example is extracted from a program with over 44.000 lines to reproduce the error.)
Last edited by Thorsten1867 on Mon May 21, 2012 2:23 pm, edited 1 time in total.
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
User avatar
Thorsten1867
Addict
Addict
Posts: 1372
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: ProGUI V1.35 User Interface Library (Important bug fixes

Post by Thorsten1867 »

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)
I've forgot to insert the ProcedureReturn in the example, but it's in the original code.
The bug is not fixed. I corrected the example. Try it! ;-(
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
Poshu
Enthusiast
Enthusiast
Posts: 459
Joined: Tue Jan 25, 2005 7:01 pm
Location: Canada

Re: ProGUI V1.35 User Interface Library (Important bug fixes

Post by Poshu »

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
fixed *again*... Same bugfix as the previous one...
User avatar
Thorsten1867
Addict
Addict
Posts: 1372
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: ProGUI V1.35 User Interface Library (Important bug fixes

Post by Thorsten1867 »

I found your "bugfix". But now the "TextControlEx()" is no longer part of the container.
The container contains the sidebar of my program. I'm sorry, but my problem is not fixed if the code is changend in this way.

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()

      .....
Last edited by Thorsten1867 on Wed May 23, 2012 3:17 pm, edited 1 time in total.
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.35 User Interface Library (Important bug fixes

Post by PrincieD »

Hi Thorsten,

I can confirm the bug and was an oversight on my part (Sorry! :oops: ). The TextControlEx is now a sub-classed PanelEx but the problem is that when using the UserLib the PanelEx changes the current gadget list to point to the PanelEx page HWND however the previous gadget list doesn't get restored because there is no way to tell what it was previously outside of ProGUI. I've now thought of a better way to do this and involves just adding an extra flag to the AddPanelExImagePage() command that tells ProGUI not change the current gadget list. I'll have the fixed version ready today or tomorrow but in the meantime this simple work-around should work:

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()
Poshu wrote:Wow, I just spent a few month away from my comp and progui is looking better than ever °_°; woohooh!
Thanks mate! good to hear from you too! :D

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: ProGUI V1.35 User Interface Library (Important bug fixes

Post by ts-soft »

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)
:wink:
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.35 User Interface Library (Important bug fixes

Post by PrincieD »

ts-soft wrote:

Code: Select all

oldgadgetlist = UseGadgetList(0)
:wink:
Oh yep that would work lol thanks Thomas :)

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
Locked