Posted: Mon Aug 21, 2006 1:15 pm
Update 12.22 (both libs)
- changed PanelGadget coloring method
- changed PanelGadget coloring method
http://www.purebasic.com
https://www.purebasic.fr/english/
I fear not.magicjo wrote:@gnozal, settings the colors for Frame3DGadget and OptionGadget don't work very well when xp theme is enabled: is possibile to do anything ?
AND51 wrote:But, how to instal and use the Lib?
PureCOLOR.chm wrote:This library exists in several versions :
- the standard version, located in %Purebasic%\PureLibraries\UserLibraries\ ;
- the thread-safe version, located in %Purebasic%\SubSystems\UserLibThreadSafe\PureLibraries\ .
- the unicode version, located in %Purebasic%\SubSystems\UserLibUnicode\PureLibraries\ .
- the unicode + thread-safe version, located in %Purebasic%\SubSystems\UserLibunicodeThreadSafe\PureLibraries\ .
In order to use this library in thread-safe mode (compiler option /THREAD), you have to enable the
subsystem 'UserLibThreadSafe' in the PB IDE, or add '/SUBSYSTEM UserLibThreadSafe' to the
PBCompiler arguments. In jaPBe, do nothing : it will automatically enable the 'UserLibThreadSafe'
subsystem to use the threadsafe versions of the installed userlibraries.
It's the same logic for unicode and unicode + thread-safe modes.
I you use jaPBe V3, you don't have to (it's automatic).AND51 wrote:But, how to instal and use the Lib?. I don't want to use the Subsystem things. Or do I have to?
Great - thanks alot!gnozal wrote:- added unicode / unicode+threadsafe versions
You are right, multiline buttons are not supported. I don't use multiline buttons myself, so I never thought of supporting them.rsts wrote:PureColor doesn't work on a multiline button?
Ok, on the to-do list.RichardL wrote:REQUEST
======
Please could PureCOLOR_SetButtonColor() be matched with PureCOLOR_GetButtonColor() ?
Code: Select all
If OpenWindow(0, 10, 10, 300, 200, "Ownerdraw Menu Demo", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
If CreateMenu(0, WindowID(0))
MenuTitle("Menu 1")
MenuItem(1, "Menu item 1")
MenuItem(2, "Menu item 2")
MenuItem(3, "Menu item 3")
MenuItem(4, "Exit")
MenuTitle("Menu 2")
MenuItem(5, "Menu item 1")
MenuItem(6, "Menu item 2 (longer)")
MenuItem(7, "Menu item 3")
MenuTitle("Extra menu")
MenuItem(8, "Extra long menu item")
OpenSubMenu("The level 1 submenu")
MenuItem(9, "The pure power !")
OpenSubMenu("The level 2 submenu")
MenuItem(10, "What ?")
MenuItem(11, "Hello ...")
CloseSubMenu()
CloseSubMenu()
EndIf
;
; MENU COLORS
; -------------
; Owner drawn :
; -------------
PureCOLOR_SetMenuColors(0, #Red, RGB(200, 255, 200), #Red, RGB(100, 255, 100))
PureCOLOR_SetWindowColor(0, RGB(200, 255, 200))
; -------------
; or not (but then only backcolor) :
; -------------
;PureCOLOR_SetPopupMenuBackColor(0, RGB(200, 255, 200))
; -------------
Repeat
event = WaitWindowEvent()
If event = #PB_Event_Menu
Debug EventMenu()
EndIf
Until event = #PB_Event_CloseWindow
EndIf
End
As stated in the help file, PureCOLOR uses it's own menu numbering (see help topics for PureCOLOR_SetMenuItemColors() and PureCOLOR_EventMenuID()). To get the correct event menu id, you have to use PureCOLOR_EventMenuID(). Sorry for this inconvenience.Inf0Byt3 wrote:Hi! I've got a problem with the menu coloring. When activation PureColor for the menu, the MenuItem resets. Maybe i'm missing something.
Here's a quick example that should debug 1,2,3,4,5,6,7,8, etc. But it only debugs from 1 to 3...
Code: Select all
If OpenWindow(0, 10, 10, 300, 200, "Ownerdraw Menu Demo", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
If CreateMenu(0, WindowID(0))
MenuTitle("Menu 1")
MenuItem(1, "Menu item 1")
MenuItem(2, "Menu item 2")
MenuItem(3, "Menu item 3")
MenuItem(4, "Exit")
MenuTitle("Menu 2")
MenuItem(5, "Menu item 1")
MenuItem(6, "Menu item 2 (longer)")
MenuItem(7, "Menu item 3")
MenuTitle("Extra menu")
MenuItem(8, "Extra long menu item")
OpenSubMenu("The level 1 submenu")
MenuItem(9, "The pure power !")
OpenSubMenu("The level 2 submenu")
MenuItem(10, "What ?")
MenuItem(11, "Hello ...")
CloseSubMenu()
CloseSubMenu()
EndIf
;
; MENU COLORS
; -------------
; Owner drawn :
; -------------
PureCOLOR_SetMenuColors(0, #Red, RGB(200, 255, 200), #Red, RGB(100, 255, 100))
PureCOLOR_SetWindowColor(0, RGB(200, 255, 200))
; -------------
; or not (but then only backcolor) :
; -------------
;PureCOLOR_SetPopupMenuBackColor(0, RGB(200, 255, 200))
; -------------
Repeat
event = WaitWindowEvent()
If event = #PB_Event_Menu
Debug EventMenu()
Debug PureCOLOR_EventMenuID()
EndIf
Until event = #PB_Event_CloseWindow
EndIf
End