It is currently Thu May 23, 2013 3:12 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 926 posts ]  Go to page Previous  1 ... 43, 44, 45, 46, 47, 48, 49 ... 62  Next
Author Message
 Post subject: Re: ProGUI V1.31 User Interface Library (Bug Fix Release)
PostPosted: Fri Feb 10, 2012 11:59 pm 
Offline
User
User

Joined: Mon Jun 06, 2011 8:28 am
Posts: 13
Hi PrincieD, how can I change background color of a string gadget ...SetGadgetColor not working ... ??~!

from 'PreferencesExample.pb' :
Code:
  ;/ connection pannel
  window = AddPanelExImagePage(0, image(5)\normal, 0, 0, 0, 0, #PNLX_CENTRE|#PNLX_VCENTRE)
  TextControlEx(window, #TextControl_1, 2, 2, 434, 0, "Connection", #TCX_BK_GRADIENT|#TCX_TRANSPARENT|#TCX_VCENTRE)
 
  window = Frame3DGadget(#Frame3D_7, 13, 44, 410, 90, "IRC Details")
  SetWindowLongPtr_(window, #GWL_EXSTYLE, GetWindowLongPtr_(window, #GWL_EXSTYLE)|#WS_EX_TRANSPARENT)
  TextGadget(#Text_10, 30, 68, 60, 20, "Nick Name")
  hStringGadget = StringGadget(#String_9, 90, 68, 120, 20, "")

  SetGadgetColor(#String_9,#PB_Gadget_BackColor ,RGB(230, 54, 146))        ;<<<<<<<<<<<<

  SendMessage_(hStringGadget, #EM_SETLIMITTEXT, 9, 0)
.....


Top
 Profile  
 
 Post subject: Re: ProGUI V1.31 User Interface Library (Bug Fix Release)
PostPosted: Sat Feb 11, 2012 11:35 am 
Offline
Enthusiast
Enthusiast

Joined: Tue Jan 25, 2005 7:01 pm
Posts: 223
Location: France
Well, Progui is not compatible with pb command set, you need to check the documentation and SetTextControlExColour(ID.i, TextColour.l, BackColour.l)


Top
 Profile  
 
 Post subject: Re: ProGUI V1.31 User Interface Library (Bug Fix Release)
PostPosted: Sat Feb 11, 2012 2:45 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Aug 10, 2005 2:08 pm
Posts: 558
Location: Yorkshire, England
ruslanx wrote:
Hi PrincieD, how can I change background color of a string gadget ...SetGadgetColor not working ... ??~!

from 'PreferencesExample.pb' :
Code:
  ;/ connection pannel
  window = AddPanelExImagePage(0, image(5)\normal, 0, 0, 0, 0, #PNLX_CENTRE|#PNLX_VCENTRE)
  TextControlEx(window, #TextControl_1, 2, 2, 434, 0, "Connection", #TCX_BK_GRADIENT|#TCX_TRANSPARENT|#TCX_VCENTRE)
 
  window = Frame3DGadget(#Frame3D_7, 13, 44, 410, 90, "IRC Details")
  SetWindowLongPtr_(window, #GWL_EXSTYLE, GetWindowLongPtr_(window, #GWL_EXSTYLE)|#WS_EX_TRANSPARENT)
  TextGadget(#Text_10, 30, 68, 60, 20, "Nick Name")
  hStringGadget = StringGadget(#String_9, 90, 68, 120, 20, "")

  SetGadgetColor(#String_9,#PB_Gadget_BackColor ,RGB(230, 54, 146))        ;<<<<<<<<<<<<

  SendMessage_(hStringGadget, #EM_SETLIMITTEXT, 9, 0)
.....


Hi ruslanx,

This is a bit of an oversight/bug in PureBasic. The StringGadget isn't actually coloured by the Windows API it's coloured by owner-draw code that PureBasic handles, unfortunately PureBasic doesn't keep track of the StringGadget if it's inside a none PB window using UseGadgetList and hence the owner-draw code is not executed. The owner-draw code that colours the string gadget is apparently in the main window callback instead of being in the actual string gadget's callback :?

I can't think of a work around at the moment but there might be one. I'll be adding a skinned edit gadget very soon to ProGUI anyway so this won't be an issue in the future.

Chris.

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


Top
 Profile  
 
 Post subject: Re: ProGUI V1.31 User Interface Library (Bug Fix Release)
PostPosted: Tue Feb 14, 2012 8:32 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat May 17, 2003 11:31 am
Posts: 5808
> unfortunately PureBasic doesn't keep track of the StringGadget if it's inside a none PB window using UseGadgetList

'inside a none' may cause some confusion...

_________________
( PB5.11 Win7 x64 Dell XPS710 Raid 0 VelociRaptor Intel Q6600 nForce 5 NVidia GTS450 )
( You have two options: psychotherapy, or the PureBasic Survival Guide... )


Top
 Profile  
 
 Post subject: Re: ProGUI V1.31 User Interface Library (Bug Fix Release)
PostPosted: Wed Feb 15, 2012 4:01 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Aug 10, 2005 2:08 pm
Posts: 558
Location: Yorkshire, England
blueznl wrote:
> unfortunately PureBasic doesn't keep track of the StringGadget if it's inside a none PB window using UseGadgetList

'inside a none' may cause some confusion...


Sorry I meant a window created using the Windows API not PB's OpenWindow()

Chris.

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


Top
 Profile  
 
 Post subject: Re: ProGUI V1.31 User Interface Library (Bug Fix Release)
PostPosted: Thu Feb 16, 2012 4:51 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Aug 10, 2005 2:08 pm
Posts: 558
Location: Yorkshire, England
Hey guys, just realised that ProGUI is using about 400 meg (64bit version) of virtual memory in ProcessExplorer :shock: :shock: I've isolated it down to the skin subsystem using nested maps in the structures so beware of this if you have a map of a structure with another map of a structure inside that one and so on. I'll be re-factoring the internals to use just linked lists for the skin subsystem over the next few days but don't worry the external API will remain unchanged. What a bummer lol *sigh

Chris.

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


Top
 Profile  
 
 Post subject: Re: ProGUI V1.32 User Interface Library (Huge Memory Usage F
PostPosted: Thu Feb 16, 2012 11:00 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Aug 10, 2005 2:08 pm
Posts: 558
Location: Yorkshire, England
Fixed! :D

See top of thread!

Chris.

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


Top
 Profile  
 
 Post subject: Re: ProGUI V1.32 User Interface Library (Huge Memory Usage F
PostPosted: Fri Feb 17, 2012 2:13 am 
Offline
Enthusiast
Enthusiast

Joined: Mon May 14, 2007 2:13 am
Posts: 732
Location: Darling River
Great stuff.
Keep up the good work. :)

_________________
PureBasic Rocks! Even More! And More!
PureBasic 5, Now We're Really Rockin!


Top
 Profile  
 
 Post subject: Re: ProGUI V1.32 User Interface Library (Huge Memory Usage F
PostPosted: Fri Feb 17, 2012 3:35 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Aug 10, 2005 2:08 pm
Posts: 558
Location: Yorkshire, England
electrochrisso wrote:
Great stuff.
Keep up the good work. :)


Thanks mate! :)

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


Top
 Profile  
 
 Post subject: Re: ProGUI V1.32 User Interface Library (Huge Memory Usage F
PostPosted: Fri Feb 17, 2012 10:26 pm 
Offline
User
User

Joined: Fri Sep 04, 2009 7:08 pm
Posts: 14
Location: Corsica
Hi PrincieD
I'am trying the Imagebutton but i can't manage to make it work like i want to :
It seems that ExbuttonImageEx() and ToolBarImageButtonEx() acts differently when you pass the mouse on them.
With ImageToolBarEx(),the 'normal' image and the 'hot' image mixes.
Bye

Code:
; Remember to enable XP Skin Support!
; Demonstrates how ProGUI components can easily be used
; to create novel, attractive and sophisticated user interfaces.

CompilerIf Defined(StartProGUI, #PB_Function) = #False
  IncludeFile "ProGUI_PB.pb"
CompilerEndIf
StartProGUI("", 0, 0, 0, 0, 0, 0, 0)

Global w_xpos
Global w_ypos
Global w_width
Global w_height
w_width = 800
w_height = 600

;- Window Constants
Enumeration
  #Window_0
EndEnumeration

Enumeration
  #TOOLBAR_0
EndEnumeration

Enumeration
  #TBUTTON_12
  #TBUTTON_16
  #TBUTTON_16b
EndEnumeration

; set up structure for easy access to images
Structure images
  normal.l
  hot.l
  disabled.l
EndStructure
Global Dim image.images(60)

;- Load in some images
ImgPath("Icons\DCCManager") ; set the default path for LoadImg

; preferences button
image(12)\normal = LoadImg("wrench.ico", 0, 0, 0)
image(12)\hot = LoadImg("wrench_h.ico", 0, 0, 0)
image(12)\disabled = LoadImg("wrench_p.ico", 0, 0, 0)

; about button
image(29)\normal = LoadImg("DCC2_32x32.ico", 0, 0, 0)
image(29)\hot = LoadImg("DCC2_32x32_h.ico", 0, 0, 0)
image(29)\disabled = LoadImg("DCC2_32x32_p.ico", 0, 0, 0)


Procedure Open_Window_0()
   
  OpenWindow(#Window_0, 0, 0, w_width, w_height, "DCC Manager V1.8 User Interface Example", #PB_Window_ScreenCentered | #PB_Window_SizeGadget | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget); | #PB_Window_Invisible)
  WindowBounds(#Window_0, 400, 200, #PB_Ignore, #PB_Ignore)
  SetWindowColor(#Window_0, $996633)

  If IsWindow(#Window_0)
    toolbar = CreateToolBarEx(#TOOLBAR_0, WindowID(#Window_0), 53, 39, #UISTYLE_IMAGE)
   
    ToolBarImageButtonEx(#TBUTTON_12, "", image(12)\normal, image(29)\hot, image(29)\disabled, #BTNS_AUTOSIZE)
    ToolBarImageButtonEx(#TBUTTON_16, "", image(29)\normal, image(29)\hot, image(29)\disabled, #BTNS_AUTOSIZE)
  EndIf
  ImageButtonEx(WindowID(#Window_0),    #TBUTTON_16b, 100, 100, 0, 0,  image(12)\normal, image(29)\hot, image(29)\hot, image(12)\disabled)
EndProcedure


Open_Window_0()
;HideWindow(#Window_0, #False)

Repeat
  Event = WaitWindowEvent()

   If Event = #PB_Event_Gadget
    gadget = EventGadget()
    Debug "gadget=" + Str(gadget)
  EndIf
 
Until Event = #WM_CLOSE
CloseWindow(#Window_0)
End


Top
 Profile  
 
 Post subject: Re: ProGUI V1.32 User Interface Library (Huge Memory Usage F
PostPosted: Fri Feb 17, 2012 10:57 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Aug 10, 2005 2:08 pm
Posts: 558
Location: Yorkshire, England
Starwolf20 wrote:
Hi PrincieD
I'am trying the Imagebutton but i can't manage to make it work like i want to :
It seems that ExbuttonImageEx() and ToolBarImageButtonEx() acts differently when you pass the mouse on them.
With ImageToolBarEx(),the 'normal' image and the 'hot' image mixes.


Hi Starwolf20,

The ImageButtonEx doesn't support "cross fade" animation between the states yet, this will come later once I've refined the animation sub-system a bit.
If you want this effect then you can just use a "one button" ToolbarEx with the #UISTYLE_IMAGE flag set like you have in your posted code.

Chris.

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


Top
 Profile  
 
 Post subject: Re: ProGUI V1.32 User Interface Library (Huge Memory Usage F
PostPosted: Sat Feb 18, 2012 9:06 pm 
Offline
User
User

Joined: Fri Sep 04, 2009 7:08 pm
Posts: 14
Location: Corsica
PrincieD wrote:
If you want this effect then you can just use a "one button" ToolbarEx
Yes, thanks


Top
 Profile  
 
 Post subject: Re: ProGUI V1.32 User Interface Library (Huge Memory Usage F
PostPosted: Fri Mar 02, 2012 8:11 pm 
Offline
Addict
Addict

Joined: Sat Oct 17, 2009 10:51 pm
Posts: 919
PrincieD: Two questions for you:

1. Have you had a chance to look at the slow start up issue?
2. If so, have you had a chance to update the compiled examples?

_________________
If you are new to PB you should check out the CodeArchiv. It has examples for almost everything you would want to do in PB.


Top
 Profile  
 
 Post subject: Re: ProGUI V1.32 User Interface Library (Huge Memory Usage F
PostPosted: Mon Mar 05, 2012 7:12 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Aug 10, 2005 2:08 pm
Posts: 558
Location: Yorkshire, England
Kuron wrote:
PrincieD: Two questions for you:

1. Have you had a chance to look at the slow start up issue?
2. If so, have you had a chance to update the compiled examples?


Hey Kuron,

Yep it's been fixed since V1.31, the DLL version should load up almost instantaneously now :)

Chris.

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


Top
 Profile  
 
 Post subject: Re: ProGUI V1.32 User Interface Library (Huge Memory Usage F
PostPosted: Mon Mar 05, 2012 7:14 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Aug 10, 2005 2:08 pm
Posts: 558
Location: Yorkshire, England
Hey guys!

Here's a new ButtonEx example demonstrating basic skin modification and the fancy effects you can achieve by dropping them into a PanelEx page :)

Just save the following code into your ProGUI Examples folder:

Code:
; Remember to enable XP Skin Support!
; Demonstrates how to use the ButtonEx controls

CompilerIf Defined(StartProGUI, #PB_Function) = #False
  IncludeFile "ProGUI_PB.pb"
CompilerEndIf
StartProGUI("", 0, 0, 0, 0, 0, 0, 0)


;- Window Constants
Enumeration
  #Window_0
EndEnumeration

;- Menu/Button Command Constants
Enumeration
  #Command_Button1
  #Command_Button2
  #Command_Button3
EndEnumeration

; set up structure for easy access to icon images
Structure images
  normal.i
  hot.i
  pressed.i
  disabled.i
EndStructure
Global Dim image.images(3)

; load in some example icons
image(0)\normal = LoadImg("icons\shell32_235.ico", 16, 16, 0)
image(0)\hot = ImgBlend(image(0)\normal, 255, 30, 0, 0, 0, 0)
image(0)\pressed = ImgBlend(image(0)\normal, 255, 0, -30, 0, 0, 0)
image(1)\normal = ImgBlend(LoadImg("icons\shell32_4.ico", 96, 96, 0), 100, 0, 0, 0, 0, #ImgBlend_DestroyOriginal)
image(2)\normal = LoadImg("icons\dccmanager\downloadpanel_border.png", 0, 0, 0)

;- process ProGUI Windows event messages here
; events can also be simply captured using WaitWindowEvent() too in the main event loop, but for ease of porting the examples to other languages the callback method is used.
; #PB_Event_Menu and EventMenu() can be used to get the selected menu item when using the WaitWindowEvent() method.
Procedure ProGUI_EventCallback(hwnd, message, wParam, lParam)
 
  Select message
     
    ; handle selection of menu items and buttons
    Case #WM_COMMAND
     
      If HWord(wParam) = 0 ; is an ID
         
        MenuID = LWord(wParam)
     
        Debug MenuID
       
      EndIf
       
    ; resize panelex and textcontrolex when main window resized
    Case #WM_SIZE
     
      MoveWindow_(PanelExID(0, -1), 5, 5, WindowWidth(#Window_0)-10, WindowHeight(#Window_0)-10, #True)
     
  EndSelect
 
  ProcedureReturn #PB_ProcessPureBasicEvents
 
EndProcedure

; creates a window
Procedure Open_Window_0()
 
  OpenWindow(#Window_0, 50, 50, 700, 500, "Button Example: Resize the main window!", #PB_Window_ScreenCentered | #PB_Window_SizeGadget | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_Invisible)
 
  ; create PanelEx as main window content
  CreatePanelEx(0, WindowID(#Window_0), 215, 5, 480, 490, 0)
  page = AddPanelExImagePage(2, image(1)\normal, 0, 0, 0, 0, #PNLX_CENTRE|#PNLX_VCENTRE)
  SetPanelExPageBorder(0, 0, image(2)\normal, -1, 0, 0)
  SetPanelExPageScrolling(0, 0, #PNLX_AUTOSCROLL, #True)
 
  ButtonEx(page, #Command_Button1, 100, 100, 200, 100, "A Great Big Button!", 0, 0, 0, 0, 0)
  ButtonEx(page, #Command_Button2, 100, 200, 160, 32, "Button and Icon", image(0)\normal, image(0)\hot, image(0)\pressed, 0, 0)
 
  ; copy system default skin of ButtonEx
  skin = GetButtonExSkin(#Command_Button1)
  newSkin = CopySkin(skin)
  ; make position of icon for normal state left aligned
  SetSkinProperty(newSkin, "buttonex", "normal", "image position", "x: 0; y: centre")
  ; add a background image for hot state
  SetSkinProperty(newSkin, "buttonex", "hot", "background image", "icons\newlogo2_256x256.png")
  ; make text red for hot state
  SetSkinProperty(newSkin, "buttonex", "hot", "text", "colour: red")
  ButtonEx(page, #Command_Button3, 400, 200, 200, 64, "Button and Modified Skin", image(0)\normal, image(0)\hot, image(0)\pressed, 0, newSkin)
 
 
  ; attach our events callback for processing Windows ProGUI messages
  SetWindowCallback(@ProGUI_EventCallback())
 
EndProcedure


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

; enter main event loop
Repeat
 
  Event = WaitWindowEvent()
 
Until Event = #WM_CLOSE

End


Cheers!

Chris.

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 926 posts ]  Go to page Previous  1 ... 43, 44, 45, 46, 47, 48, 49 ... 62  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye