It is currently Thu May 23, 2013 9:30 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 510 posts ]  Go to page Previous  1 ... 28, 29, 30, 31, 32, 33, 34  Next
Author Message
 Post subject: Re: PureCOLOR library : coloring gadgets (and much more)
PostPosted: Mon Feb 22, 2010 11:00 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
Update v15.00 (PB 4.40 version)

Changes :
- split library in 3 parts (menus, buttons, the rest of the gadgets)
  So you have a smaller footprint if you don't use all functions.
- new functions (user request) : PureCOLOR_SetIcon[Toggle]Button()

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
 
 Post subject: Re: PureCOLOR library : coloring gadgets (and much more)
PostPosted: Wed Feb 24, 2010 9:55 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
Update v15.02 (PB 4.40 version)

Changes :
- fixed window icon menu / popup icon menu coexistence issue posted by iostream (finally)

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
 
 Post subject: Re: PureCOLOR library : coloring gadgets (and much more)
PostPosted: Tue Mar 30, 2010 7:54 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Jan 02, 2007 8:16 pm
Posts: 4328
Location: Cypress TX
Having issue clearing button colors... will try new DL and see if that is the fix!

Nope:

look...

Code:

Enumeration
  #Window_0
EndEnumeration

Enumeration
  #Button_8
  #Button_7
  #Button_6
  #Button_5
  #Button_4
  #Button_3
  #Button_2
  #Button_1
  #Button_0
  #Text_MSG
EndEnumeration

Structure VisualDesignerGadgets
  Gadget.l
  EventFunction.l
EndStructure

Global NewList EventProcedures.VisualDesignerGadgets()
;-
Procedure Whichbutton(button)
  For XX = #Button_8 To #Button_0
    PureCOLOR_ClearButtonColor(XX)
  Next
  PureCOLOR_SetButtonColor(button, RGB(255, 255, 255), RGB(0, 0, 0))
EndProcedure
;-
Procedure Button_8_Event(Window, Event, Gadget, Type)
  Whichbutton(#Button_8)
EndProcedure

Procedure Button_7_Event(Window, Event, Gadget, Type)
  Whichbutton(#Button_7)
EndProcedure

Procedure Button_6_Event(Window, Event, Gadget, Type)
  Whichbutton(#Button_6)
EndProcedure

Procedure Button_5_Event(Window, Event, Gadget, Type)
  Whichbutton(#Button_5)
EndProcedure

Procedure Button_4_Event(Window, Event, Gadget, Type)
  Whichbutton(#Button_4)
EndProcedure

Procedure Button_3_Event(Window, Event, Gadget, Type)
  Whichbutton(#Button_3)
EndProcedure

Procedure Button_2_Event(Window, Event, Gadget, Type)
  Whichbutton(#Button_2)
EndProcedure

Procedure Button_1_Event(Window, Event, Gadget, Type)
  Whichbutton(#Button_1)
EndProcedure

Procedure Button_0_Event(Window, Event, Gadget, Type)
  Whichbutton(#Button_0)
EndProcedure
;-
Procedure RegisterGadgetEvent(Gadget, *Function)
 
  If IsGadget(Gadget)
    AddElement(EventProcedures())
    EventProcedures()\Gadget        = Gadget
    EventProcedures()\EventFunction = *Function
  EndIf
 
EndProcedure

Procedure CallEventFunction(Window, Event, Gadget, Type)
 
  ForEach EventProcedures()
    If EventProcedures()\Gadget = Gadget
      CallFunctionFast(EventProcedures()\EventFunction, Window, Event, Gadget, Type)
      LastElement(EventProcedures())
    EndIf
  Next
 
EndProcedure
;-
Procedure Open_Window_0()
 
  If OpenWindow(#Window_0, 5, 5, 248, 441, "BUTON TESTER",  #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar )
   
    ButtonGadget(#Button_0, 5, 5, 235, 40, "BUTTON 0")
    RegisterGadgetEvent(#Button_0, @Button_0_Event())
    ButtonGadget(#Button_1, 5, 50, 235, 40, "BUTTON 1")
    RegisterGadgetEvent(#Button_1, @Button_1_Event())
    ButtonGadget(#Button_2, 5, 95, 235, 40, "BUTTON 2")
    RegisterGadgetEvent(#Button_2, @Button_2_Event())
    ButtonGadget(#Button_3, 5, 140, 235, 40, "BUTTON 3")
    RegisterGadgetEvent(#Button_3, @Button_3_Event())
    ButtonGadget(#Button_4, 5, 185, 235, 40, "BUTTON 4")
    RegisterGadgetEvent(#Button_4, @Button_4_Event())
    ButtonGadget(#Button_5, 5, 230, 235, 40, "BUTTON 5")
    RegisterGadgetEvent(#Button_5, @Button_5_Event())
    ButtonGadget(#Button_6, 5, 275, 235, 40, "BUTTON 6")
    RegisterGadgetEvent(#Button_6, @Button_6_Event())
    ButtonGadget(#Button_7, 5, 320, 235, 40, "BUTTON 7")
    RegisterGadgetEvent(#Button_7, @Button_7_Event())
    ButtonGadget(#Button_8, 5, 365, 235, 40, "BUTTON 8")
    RegisterGadgetEvent(#Button_8, @Button_8_Event())
    TextGadget(#Text_MSG, 5, 410, 235, 25, "", #PB_Text_Center | #PB_Text_Border)
   
  EndIf
EndProcedure
;-
Open_Window_0()

PureCOLOR_SetButtonColor(#Button_0, RGB(255, 255, 255), RGB(0, 0, 0))

Repeat
 
  Event  = WaitWindowEvent()
  Gadget = EventGadget()
  Type   = EventType()
  Window = EventWindow()
 
  Select Event
  Case #PB_Event_Gadget
    CallEventFunction(Window, Event, Gadget, Type)
   
  EndSelect
 
Until Event = #PB_Event_CloseWindow

End



This code SHOULD uncolor all the buttons and then slap the color on the selectted button... instead it simply colors the new button as well... :(

Using PureCOLOR_ClearAllButtonColors() is not an option in my program as I have MANY buttons in my POS... in PB4.3 this code works... I suspect it is a PB4.41 issue!



The latest version I could download fromyour site was 15.03

_________________
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/


Top
 Profile  
 
 Post subject: Re: PureCOLOR library : coloring gadgets (and much more)
PostPosted: Fri Apr 02, 2010 11:39 am 
Offline
Addict
Addict
User avatar

Joined: Thu Aug 07, 2003 7:01 pm
Posts: 2853
Location: United Kingdom
On PureBasic v4.50b2 I get polink errors. They refer to unsolved external symbols 'pb_callfunctionfast', 'pb_callfunctionfast7' an 'pb_callfunctionfast4'.

_________________
http://www.SinisterSoft.com <- My Business website
http://www.ReportComplete.com and http://www.ReportPlus.co.uk <- School end of term reports system


Top
 Profile  
 
 Post subject: Re: PureCOLOR library : coloring gadgets (and much more)
PostPosted: Fri Apr 02, 2010 5:15 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Jan 02, 2007 8:16 pm
Posts: 4328
Location: Cypress TX
OK with a little help from a tiny bit of code from eesau I have used the API to reset colors in a proceedure.

I changed the following procedure:

Code:
Procedure Whichbutton(button)

cbutface = GetSysColor_ ( #COLOR_BTNFACE ) ; API for theme button FACE color
cbuttext = GetSysColor_ ( #COLOR_BTNTEXT) ; API for theme button TEXT color
 
  For XX = #Button_8 To #Button_0
   ;PureCOLOR_ClearButtonColor(XX)
   PureCOLOR_SetButtonColor(XX, cbuttext, cbutface) ; use those raw values to recolor the button
  Next

 ; PureCOLOR_ClearAllButtonColors()
  PureCOLOR_SetButtonColor(button, RGB(255, 255, 255), RGB(0, 0, 0))
EndProcedure


I am worried about memory leaks... I may try to set button text and face myself... Maybe even a rounded button! (Ala VB4!)

@DoubleDutch... LIB isn't optimizeed for 4.5 yet! I suspect the new draw functions are to blame for some of our issues!

_________________
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/


Top
 Profile  
 
 Post subject: Re: PureCOLOR library : coloring gadgets (and much more)
PostPosted: Wed Apr 07, 2010 12:34 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
Rook Zimbabwe wrote:
Having issue clearing button colors... will try new DL and see if that is the fix!
The latest version I could download from your site was 15.03
I will have a look.

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
 
 Post subject: Re: PureCOLOR library : coloring gadgets (and much more)
PostPosted: Wed Apr 07, 2010 2:20 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
Update v15.04 (PB 4.40 version)

Changes :
- fixed cleared buttons not being refreshed (a global variable got lost when I split the library).

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
 
 Post subject: Re: PureCOLOR library : coloring gadgets (and much more)
PostPosted: Wed Apr 07, 2010 4:37 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Jan 02, 2007 8:16 pm
Posts: 4328
Location: Cypress TX
So would my fix :
Code:
  cbutface = GetSysColor_ ( #COLOR_BTNFACE )
  cbuttext = GetSysColor_ ( #COLOR_BTNTEXT)
 
  For XX = #Button_0 To #Button_8
    PureCOLOR_ClearButtonColor(XX)
    PureCOLOR_SetButtonColor(XX, cbuttext, cbutface)
  Next


just create more images and clutter memory?

ALSO

You need to make a DONATION link on your website... I use PureCOLOR and I intend to pay you for it!!! I am probaly going to use pureFORM soon as I am becoming dissatisfied with the current VD!!! You need to make that a purchase thing... $10.00 or more!!! :D

Yrretti wrote you do a lot of good works for PB and I wholly agree!!! 8)

_________________
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/


Top
 Profile  
 
 Post subject: Re: PureCOLOR library : coloring gadgets (and much more)
PostPosted: Thu Apr 08, 2010 10:41 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
Rook Zimbabwe wrote:
So would my fix ... just create more images and clutter memory?
No, PureCOLOR_ClearButtonColor() clears the allocated resources.
Anyway, a simple refresh (like RedrawWindow_()) would have been enough.

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
 
 Post subject: Re: PureCOLOR library : coloring gadgets (and much more)
PostPosted: Tue May 11, 2010 2:49 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
I have have just recompiled the library for PB 4.50 beta 4

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
 
 Post subject: Re: PureCOLOR library : coloring gadgets (and much more)
PostPosted: Tue May 11, 2010 2:54 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Apr 30, 2003 8:15 am
Posts: 710
Location: Germany
gnozal wrote:
I have have just recompiled the library for PB 4.50 beta 4

thank you! works fine with pb4.50 B4 now :-)

_________________
"Daddy, I'll run faster, then it is not so far..."


Top
 Profile  
 
 Post subject: Re: PureCOLOR library : coloring gadgets (and much more)
PostPosted: Fri May 21, 2010 4:28 pm 
Offline
New User
New User

Joined: Fri Nov 13, 2009 10:33 pm
Posts: 7
I am using PureColor 4.5B4 and the Option Gadgets are not setting the Front Color.

PureColor_SetGadgetColor(#Option1, $FFFFFF, #Blue)

Sets the Background, but not the ForeGound(Text)

Thanks


Top
 Profile  
 
 Post subject: Re: PureCOLOR library : coloring gadgets (and much more)
PostPosted: Fri May 21, 2010 4:45 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
rnospam wrote:
I am using PureColor 4.5B4 and the Option Gadgets are not setting the Front Color.
PureColor_SetGadgetColor(#Option1, $FFFFFF, #Blue)
Sets the Background, but not the ForeGound(Text)
Thanks
This works here :
Code:
OpenWindow(0, 100, 300, 400, 200, "PureCOLOR test", #PB_Window_SystemMenu)
OptionGadget(1, 10, 10, 90, 20, "OptionGadget")
PureCOLOR_SetGadgetColor(1, RGB(255,0,0), RGB(0,0,255))
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
Tested on WinXP (no skins)

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
 
 Post subject: Re: PureCOLOR library : coloring gadgets (and much more)
PostPosted: Fri May 21, 2010 6:16 pm 
Offline
New User
New User

Joined: Fri Nov 13, 2009 10:33 pm
Posts: 7
OpenWindow(0, 100, 300, 400, 200, "PureCOLOR test", #PB_Window_SystemMenu)
OptionGadget(1, 10, 10, 90, 20, "OptionGadget")
PureCOLOR_SetGadgetColor(1, RGB(255,0,0), RGB(0,0,255))
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow

Does not work, I am using Windows 7, 64Bit, PureBasic 4.5Beta4 32Bit. Aero Theme.

Text Color is always black.

Thanks..

Rnospam


Top
 Profile  
 
 Post subject: Re: PureCOLOR library : coloring gadgets (and much more)
PostPosted: Fri May 21, 2010 6:20 pm 
Offline
New User
New User

Joined: Fri Nov 13, 2009 10:33 pm
Posts: 7
Update.. Also Does not work with checkbox gadgets

PB 4.41 and PureColor Version 15.03 work great.

Rnospam


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 510 posts ]  Go to page Previous  1 ... 28, 29, 30, 31, 32, 33, 34  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


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