ProGUI V1.38 UI Library (Small Bug Fix)

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
Thorsten1867
Addict
Addict
Posts: 1372
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: ProGUI V1.12! Professional Graphical User Interface Libr

Post by Thorsten1867 »

SetGadgetColor() does'nt work for the ListView-gadget in PanelEx.

Code: Select all

IncludeFile "ProGUI_PB.pb" ; comment this line out when using the UserLibrary version
StartProGUI("", 0, 0, 0, 0, 0, 0)

Enumeration
  #Window
EndEnumeration

Enumeration
  #Font_Arial9
  #Panel
  #ListView
EndEnumeration

LoadFont(#Font_Arial9,"Arial",9,0)

Procedure Open_Window()
  OpenWindow(#Window, 50, 50, 200, 120, "Example", #PB_Window_ScreenCentered | #PB_Window_SizeGadget | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_Invisible)
  CreatePanelEx(#Panel, WindowID(#Window), 0, 0, 180, 120, 0)
  AddPanelExPage(0)
  ListViewGadget(#ListView, 15, 15, 120, 79) 
  SetGadgetFont(#ListView, FontID(#Font_Arial9))
  SetGadgetColor(#ListView, #PB_Gadget_FrontColor, RGB($FF,$0,$0)
  AddGadgetItem(#ListView, -1, "Row 1")
  AddGadgetItem(#ListView, -1, "Row 2")
  AddGadgetItem(#ListView, -1, "Row 3")
EndProcedure

Open_Window() ; create window
HideWindow(0, 0)  ; show our newly created window

Repeat
  Event = WaitWindowEvent()
  If Event = #PB_Event_Gadget 
    GadgetID = EventGadget()
  EndIf
Until Event = #WM_CLOSE
CloseWindow(#Window)
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.12! Professional Graphical User Interface Libr

Post by PrincieD »

Thorsten1867 wrote:SetGadgetColor() does'nt work for the ListView-gadget in PanelEx.
Hi Thorsten, I'll take a look at your code. Could be a problem with the message not being passed back up the chain of windows in the PanelEx.

The new update is gunna take a little while longer to finish but there will be some nice new features (hopefullly worth the wait!) :)

Currently fixed and implemented:

Fixed panelex no background bug
Fixed mouse tracking bug with buttonEx and window border overlap
Fixed mouse tracking bug with hyperlink in textcontrolex and window border overlap
Fixed panelEx inside panelEx background re-draw bug
Fixed bug with ToolBarEx when ToolBarButtonEx created before ImageButtonEx
Fixed/Improved rebar re-drawing
Added/fixed PNG, JPG and other image format support to MenuEx
Added/fixed PNG, JPG and other image format support to ToolbarEx
Added #PB_Any to ToolBarButtonEx and ToolBarImageButtonEx
changed ChangeToolbarExButton, if normalImageID, hotImageID or disabledImageID are set to -1 the parameter is ignored and the original image is kept
changed CreateRebar, can now accept image as parameter for custom background rendering of rebar
changed AddRebarGadget, can now accept image as parameter for custom background rendering of band
changed InsertRebarGadget, can now accept image as parameter for custom background rendering of band

Nested PanelEx's and ProGUI components now draw onto the top level PanelEx's buffer, fery fast and good memory savings now :)

Cheers!

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.12! Professional Graphical User Interface Libr

Post by PrincieD »

Thorsten1867 wrote:SetGadgetColor() does'nt work for the ListView-gadget in PanelEx.

Code: Select all

IncludeFile "ProGUI_PB.pb" ; comment this line out when using the UserLibrary version
StartProGUI("", 0, 0, 0, 0, 0, 0)

Enumeration
  #Window
EndEnumeration

Enumeration
  #Font_Arial9
  #Panel
  #ListView
EndEnumeration

LoadFont(#Font_Arial9,"Arial",9,0)

Procedure Open_Window()
  OpenWindow(#Window, 50, 50, 200, 120, "Example", #PB_Window_ScreenCentered | #PB_Window_SizeGadget | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_Invisible)
  CreatePanelEx(#Panel, WindowID(#Window), 0, 0, 180, 120, 0)
  AddPanelExPage(0)
  ListViewGadget(#ListView, 15, 15, 120, 79) 
  SetGadgetFont(#ListView, FontID(#Font_Arial9))
  SetGadgetColor(#ListView, #PB_Gadget_FrontColor, RGB($FF,$0,$0)
  AddGadgetItem(#ListView, -1, "Row 1")
  AddGadgetItem(#ListView, -1, "Row 2")
  AddGadgetItem(#ListView, -1, "Row 3")
EndProcedure

Open_Window() ; create window
HideWindow(0, 0)  ; show our newly created window

Repeat
  Event = WaitWindowEvent()
  If Event = #PB_Event_Gadget 
    GadgetID = EventGadget()
  EndIf
Until Event = #WM_CLOSE
CloseWindow(#Window)
Thorsten, I've taken a look at the code and believe this is a PureBasic bug. ListIcons work fine in the PanelEx as colours are handled by the Windows API for that control, however a ListBox needs owner draw code in order to change the colour of items (correct me if i'm wrong here!) which PureBasic must handle. I think the bug is with UseGadgetList and PB not keeping track of ownerdraw code for ListBoxes in windows other than the main #window. Could the PB team or anyone clarify this please?

The good news is, theres a pretty straightforward work around. Use the following code:

Code: Select all

UseGadgetList(WindowID(#Window))
ListViewGadget(#ListView, 15, 15, 120, 79)
SetParent_(GadgetID(#ListView), panelexid(#Panel, 0))
PureBasic then keeps track of the ListBox properly and any colour changes afterwards effect the ListBox correctly!

Hope that helps 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.12! Professional Graphical User Interface Libr

Post by Thorsten1867 »

Now the text ist colored, but now the other gadgets in the panel are not longer correctly placed.
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.12! Professional Graphical User Interface Libr

Post by PrincieD »

Thorsten1867 wrote:Now the text ist colored, but now the other gadgets in the panel are not longer correctly placed.
ah ok, this should work :) : -

Code: Select all

UseGadgetList(WindowID(#Window))
ListViewGadget(#ListView, 15, 15, 120, 79)
SetParent_(GadgetID(#ListView), panelexid(#Panel, 0))
UseGadgetList(panelexid(#Panel, 0))
Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
User avatar
GWarner
Enthusiast
Enthusiast
Posts: 605
Joined: Fri Jul 24, 2009 1:34 pm
Location: USA

Re: ProGUI V1.12! Professional Graphical User Interface Libr

Post by GWarner »

This looks like just the ticket for a project I'm working on.

Thanks!
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.12! Professional Graphical User Interface Libr

Post by PrincieD »

GWarner wrote:This looks like just the ticket for a project I'm working on.

Thanks!
You're welcome :) Just out of curiosity/interest what is it you're working on GWarner? :)
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
User avatar
GWarner
Enthusiast
Enthusiast
Posts: 605
Joined: Fri Jul 24, 2009 1:34 pm
Location: USA

Re: ProGUI V1.12! Professional Graphical User Interface Libr

Post by GWarner »

PrincieD wrote:You're welcome :) Just out of curiosity/interest what is it you're working on GWarner? :)
I'd like to tell you but if it works out it'll be a commercial product, so for now, mums the word... :mrgreen:
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.12! Professional Graphical User Interface Libr

Post by PrincieD »

GWarner wrote:
PrincieD wrote:You're welcome :) Just out of curiosity/interest what is it you're working on GWarner? :)
I'd like to tell you but if it works out it'll be a commercial product, so for now, mums the word... :mrgreen:
hehehe ahh ok ;) shhh shh :P
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
User avatar
Kuron
Addict
Addict
Posts: 1626
Joined: Sat Oct 17, 2009 10:51 pm
Location: Pacific Northwest

Re: ProGUI V1.12! Professional Graphical User Interface Libr

Post by Kuron »

I haven't looked at this since you first released it. This is really amazing.
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.12! Professional Graphical User Interface Libr

Post by PrincieD »

Kuron wrote:I haven't looked at this since you first released it. This is really amazing.
Wow! thank you very much Kuron :D
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
User avatar
GWarner
Enthusiast
Enthusiast
Posts: 605
Joined: Fri Jul 24, 2009 1:34 pm
Location: USA

Re: ProGUI V1.12! Professional Graphical User Interface Libr

Post by GWarner »

PrincieD wrote:
GWarner wrote:hehehe ahh ok ;) shhh shh :P
Right now it's in a "proof of concept" stage where even if it works, there's no guarantee we'll use it, but if we do decide to go forward with it, then I can tell you what it is. I just don't want to say we're doing something that we end up not doing.

So far I'm liking what I'm seeing and especially like that it's available in User Library form rather than just DLL form.

I'll probably buy it tomorrow or Monday after some eBay auctions I'm running end and are paid for to stoke up PayPal for the purchase.

Exchange rate sucks though, 30 Euros = 40.16 U.S. dollars. :shock:
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.12! Professional Graphical User Interface Libr

Post by PrincieD »

Right now it's in a "proof of concept" stage where even if it works, there's no guarantee we'll use it, but if we do decide to go forward with it, then I can tell you what it is. I just don't want to say we're doing something that we end up not doing.
Fair enough :) well if you do go ahead with it I'd love to hear about it!
I'll probably buy it tomorrow or Monday after some eBay auctions I'm running end and are paid for to stoke up PayPal for the purchase.
Thank you very much GWarner!, I really appreaciate it! :D
Exchange rate sucks though, 30 Euros = 40.16 U.S. dollars.
I know tell me about it! I switched to selling ProGUI in Euros because it's kind of the middle ground, I get roughly £24 after the paypal fees which is the equivalent of a good night out here in the UK lol
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: ProGUI V1.12! Professional Graphical User Interface Libr

Post by DoubleDutch »

Are you sure? £24 sounds like just the beginning of a good night in the UK! lol...

You must be a student?
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.12! Professional Graphical User Interface Libr

Post by PrincieD »

DoubleDutch wrote:Are you sure? £24 sounds like just the beginning of a good night in the UK! lol...

You must be a student?
lol how did you guess? well actually i'm an ex-student now ;), i registered myself as self-employed last Monday (which means lots of time to develop ProGUI to be something quite special! - i hope!) but i'm still living on a students budget unfortunately lol (and will be for some time no doubt!)
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
Locked