Page 3 of 35

Posted: Fri Mar 18, 2005 11:31 pm
by Flype
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

Posted: Sat Mar 19, 2005 9:13 am
by gnozal
Flype wrote:thanx gnozal - good news !
Thanks 8)
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
I never thought about these ! I was planning to add some more listicon and some richedit coloring functions. I will see ...

Posted: Sat Mar 19, 2005 9:45 am
by Manolo
gnozal wrote:
Flype wrote:thanx gnozal - good news !
Thanks 8)
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
I never thought about these ! I was planning to add some more listicon and some richedit coloring functions. I will see ...
And panelgadgets (tabs)???

Thanks gnozal :twisted:

Posted: Sat Mar 19, 2005 2:13 pm
by DoubleDutch
gnozal: Are you planning to add tree gadgets?

-Anthony

Posted: Sat Mar 19, 2005 6:45 pm
by Flype
LOL

lot's of work gnozal :wink:

Posted: Sat Mar 19, 2005 11:11 pm
by DoubleDutch
hehe :D

Posted: Mon Mar 21, 2005 8:51 am
by gnozal
Flype wrote:LOL
lot's of work gnozal :wink:
Yes, I see :shock:
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 :oops: I am not a professional programmer, it is only a hobby to me :wink:

Posted: Mon Mar 21, 2005 7:32 pm
by Flype
yes but your libs are quite useful for professional programmers to :wink:

Posted: Thu Mar 24, 2005 8:47 am
by gnozal
Library update
- new feature : now PureCOLOR_SetGadgetColor() works for ContainerGadget and ScrollAreaGadget (only BackColor is used)
- new function : PureCOLOR_SetColumnHeaderColor()
- new function : PureCOLOR_ClearColumnHeaderColor()

Posted: Thu Mar 24, 2005 9:09 am
by Blade
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...)

Posted: Thu Mar 24, 2005 10:40 am
by gnozal
Blade 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 would if I could, but I can't, so I don't :wink:
I can only test the library with Win98SE and NT4, I don't have 2k/XP (yet?).

Posted: Thu Mar 24, 2005 3:40 pm
by Flype
Very thank you again Gnozal :)

Posted: Thu Mar 24, 2005 11:06 pm
by DoubleDutch
This should help you change the colours of the selected row...

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
You may like to integrate it with your library?

-Anthony

Posted: Thu Mar 24, 2005 11:27 pm
by DoubleDutch
If you use the alternate colour flag, the text colour is always black...

Code: Select all

PureCOLOR_SetGadgetColorEx(#Customers,RGB(255,255,255),BackgroundColourGreen,BackgroundColourBlue,#PureCOLOR_LV_AlternateColors)
Gives black (not white) text...

It can be fixed if you:

Code: Select all

PureCOLOR_SetGadgetColor(#Customers,RGB(255,255,255),BackgroundColour)
After it...

But it would be nice if it worked okay... :)

Posted: Thu Mar 24, 2005 11:32 pm
by DoubleDutch
You may like to know that:

Code: Select all

SendMessage_(CustomersGadget,#LVM_SETBKCOLOR,0,BackgroundColour)
will set the colour of the unused background area - this normally stays white with your library.