PureCOLOR library : coloring gadgets (and much more)
Moderator: gnozal
thanx gnozal - good news !
what about make some new commands, based upon these posts ?
scrollbars :
viewtopic.php?t=14410
and this one, coloring a scrollareagadget :
viewtopic.php?t=13074&highlight=scrollarea+color+colour
containergadgets :
viewtopic.php?p=72952#72952
Best regards
what about make some new commands, based upon these posts ?
scrollbars :
viewtopic.php?t=14410
and this one, coloring a scrollareagadget :
viewtopic.php?t=13074&highlight=scrollarea+color+colour
containergadgets :
viewtopic.php?p=72952#72952
Best regards
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
ThanksFlype wrote:thanx gnozal - good news !
I never thought about these ! I was planning to add some more listicon and some richedit coloring functions. I will see ...Flype wrote:what about make some new commands, based upon these posts ?
scrollbars :
viewtopic.php?t=14410
and this one, coloring a scrollareagadget :
viewtopic.php?t=13074&highlight=scrollarea+color+colour
containergadgets :
viewtopic.php?p=72952#72952
Best regards
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
And panelgadgets (tabs)???gnozal wrote:ThanksFlype wrote:thanx gnozal - good news !I never thought about these ! I was planning to add some more listicon and some richedit coloring functions. I will see ...Flype wrote:what about make some new commands, based upon these posts ?
scrollbars :
viewtopic.php?t=14410
and this one, coloring a scrollareagadget :
viewtopic.php?t=13074&highlight=scrollarea+color+colour
containergadgets :
viewtopic.php?p=72952#72952
Best regards
Thanks gnozal
Return to the forum
- DoubleDutch
- Addict
- Posts: 3219
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
gnozal: Are you planning to add tree gadgets?
-Anthony
-Anthony
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
- DoubleDutch
- Addict
- Posts: 3219
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
hehe
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Yes, I seeFlype wrote:LOL
lot's of work gnozal
I have no great plan. I am adding what I need in my apps, that all. And I am glad to add some user requests too, if it isn't to complicated I am not a professional programmer, it is only a hobby to me
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Library update
- new feature : now PureCOLOR_SetGadgetColor() works for ContainerGadget and ScrollAreaGadget (only BackColor is used)
- new function : PureCOLOR_SetColumnHeaderColor()
- new function : PureCOLOR_ClearColumnHeaderColor()
- new feature : now PureCOLOR_SetGadgetColor() works for ContainerGadget and ScrollAreaGadget (only BackColor is used)
- new function : PureCOLOR_SetColumnHeaderColor()
- new function : PureCOLOR_ClearColumnHeaderColor()
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
I would if I could, but I can't, so I don'tBlade wrote:Great job!
Would be great if you state (for each command) the effect in the various Windows version. (I imagine that someone works with XP skinned, some doesnt, perhaps some will not work in systems before W2000 etc...)
I can only test the library with Win98SE and NT4, I don't have 2k/XP (yet?).
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
- DoubleDutch
- Addict
- Posts: 3219
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
This should help you change the colours of the selected row...
You may like to integrate it with your library?
-Anthony
Code: Select all
Case #WM_NOTIFY
*lvCD.NMLVCUSTOMDRAW=lparam
If *lvCD\nmcd\hdr\hwndFrom=ListGadget And *lvCD\nmcd\hdr\code=#NM_CUSTOMDRAW
Select *LVCD\nmcd\dwDrawStage
Case #CDDS_PREPAINT:ProcedureReturn(#CDRF_NOTIFYITEMDRAW)
Case #CDDS_ITEMPREPAINT:ProcedureReturn(#CDRF_NOTIFYSUBITEMDRAW)
Case #CDDS_ITEMPREPAINT|#CDDS_SUBITEM
thisItem=*lvCD\nmcd\dwItemSpec
column=*lvCD\iSubItem ; possible use in the future
subItemRect.RECT\left=#LVIR_LABEL
subItemRect.RECT\top=*lvCD\iSubItem
SendMessage_(ListGadget,#LVM_GETSUBITEMRECT,thisItem,@subItemRect)
subItemText$=GetGadgetItemText(#Clients,*lvCD\nmcd\dwItemSpec,*lvCD\iSubItem)
sitLen=Len(subItemText$)
lvFlags=#DT_END_ELLIPSIS|#DT_WORDBREAK|#DT_VCENTER
If GetGadgetState(#Clients)=thisItem
FillRect_(*lvCD\nmcd\hDC,subItemRect,SelectedBrush)
Selected=#True
ListTextColour=RGB(255,255,255)
Else
FillRect_(*lvCD\nmcd\hDC,subItemRect,BackgroundBrush)
Selected=#False
ListTextColour=RGB(0,128,255)
EndIf
No=*LVCD\nmcd\dwItemSpec
If No<MaxClients
No2=No+1
If ClientTable(No2)\ConnectDate
If Selected
If ClientTable(No2)\Connected
ListTextColour=RGB(60,255,90) ; this is the selected fgnd colour - if connected
Else
ListTextColour=RGB(255,200,200) ; this is the selected fgnd colour - if NOT connected
EndIf
Else
If ClientTable(No2)\Connected
ListTextColour=RGB(0,128,0) ; fgnd colour - if connected
Else
ListTextColour=RGB(255,96,128) ; fgnd colour - if NOT connected
EndIf
EndIf
EndIf
EndIf
SetTextColor_(*lvCD\nmcd\hDC,ListTextColour)
SetBkColor_(*lvCD\nmcd\hDC,BackgroundColour)
; subItemRect\left +3
; subItemRect\right -3
; subItemRect\bottom -3
DrawText_(*lvCD\nmcd\hDC,subItemText$,sitLen,subItemRect,lvFlags)
ProcedureReturn(#CDRF_SKIPDEFAULT)
EndSelect
EndIf
-Anthony
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
- DoubleDutch
- Addict
- Posts: 3219
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
If you use the alternate colour flag, the text colour is always black...
Gives black (not white) text...
It can be fixed if you:
After it...
But it would be nice if it worked okay...
Code: Select all
PureCOLOR_SetGadgetColorEx(#Customers,RGB(255,255,255),BackgroundColourGreen,BackgroundColourBlue,#PureCOLOR_LV_AlternateColors)
It can be fixed if you:
Code: Select all
PureCOLOR_SetGadgetColor(#Customers,RGB(255,255,255),BackgroundColour)
But it would be nice if it worked okay...
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
- DoubleDutch
- Addict
- Posts: 3219
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
You may like to know that:
will set the colour of the unused background area - this normally stays white with your library.
Code: Select all
SendMessage_(CustomersGadget,#LVM_SETBKCOLOR,0,BackgroundColour)
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system