Page 12 of 71

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

Posted: Thu Apr 22, 2010 6:05 pm
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)

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

Posted: Thu Apr 22, 2010 6:22 pm
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.

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

Posted: Thu Apr 22, 2010 8:24 pm
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.

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

Posted: Fri Apr 23, 2010 1:16 pm
by Thorsten1867
Now the text ist colored, but now the other gadgets in the panel are not longer correctly placed.

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

Posted: Fri Apr 23, 2010 2:37 pm
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.

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

Posted: Sat Apr 24, 2010 3:42 pm
by GWarner
This looks like just the ticket for a project I'm working on.

Thanks!

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

Posted: Sat Apr 24, 2010 4:38 pm
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? :)

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

Posted: Sat Apr 24, 2010 6:26 pm
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:

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

Posted: Sat Apr 24, 2010 6:49 pm
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

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

Posted: Sat Apr 24, 2010 7:05 pm
by Kuron
I haven't looked at this since you first released it. This is really amazing.

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

Posted: Sat Apr 24, 2010 7:20 pm
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

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

Posted: Sat Apr 24, 2010 9:59 pm
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:

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

Posted: Sat Apr 24, 2010 10:53 pm
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

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

Posted: Sun Apr 25, 2010 10:10 am
by DoubleDutch
Are you sure? £24 sounds like just the beginning of a good night in the UK! lol...

You must be a student?

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

Posted: Sun Apr 25, 2010 1:43 pm
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!)