English
Forum

GridBOX slot colour

 

Ernst
Hi,
Cls
Var Dlg&     = Create("Dialog", %Hwnd, "", 300, 200, 400, 200)
Var hGrid&   = Create("GridBox", Dlg&,"Links;2;180;Mitte;2;100;Rechts;2;80", 2, 0, 0, 400, 190)

While 1

    WaitInput

EndWhile

End
so How I with the message " sendmessage(hGrid&,$1001,0,RGB(180,180,180)) "The kompletten background dye can, there there irgendeine message or others Possibility only a slot (z.B. The slot "Mitte") einzufärben - even yet before The GridBOX befüllt becomes (means not Texthintergrundfarbe) ?
Greeting serious
 
07/25/16  
 




Thomas
Freier
Perhaps helps the moreover:
 $H Messages.ph
 $H windows.ph
 $H commctrl.ph
Var WindowWidth&  = 500
Var WindowHeight& = 500
set("Fastmode",1)
windowStyle $250
WINDOW 0,0-0,0
CLS ~GetSysColor(~COLOR_BTNFACE)
Declare LvDraw#
STRUCT LvDraw = HwndFrom&,idFrom&,Code&,DrawStage&,Hdc&,Rect#(16),ItemSpec&,ItemState&,ItemLparam&,Text&,Textbk&,SubItem&
Dim LvDraw#,LvDraw

Subclassproc'--------------------------------------------------------

    If subclassmessage(&swnd,~WM_NOTIFY)

        LvDraw#=&slparam

        If (LvDraw#.Hwndfrom&=Lv&)*(LvDraw#.Code&=~NM_CUSTOMDRAW)

            set("winproc",0)
            Case LvDraw#.DrawStage&=~CDDS_PREPAINT:    Return ~CDRF_NOTIFYITEMDRAW
            Case LvDraw#.DrawStage&=~CDDS_ITEMPREPAINT:return ~CDRF_NOTIFYSUBITEMDRAW

            If LvDraw#.DrawStage&=~CDDS_SUBITEM | ~CDDS_ITEMPREPAINT

                Case LvDraw#.SubItem&=0:LvDraw#.Textbk&=rgb(0,0,128)
                Case LvDraw#.SubItem&=1:LvDraw#.Textbk&=rgb(128,128,0)
                Case LvDraw#.SubItem&=2:LvDraw#.Textbk&=rgb(128,0,0)
                Case LvDraw#.SubItem&=0:LvDraw#.Text&=rgb(255,255,0)
                Case LvDraw#.SubItem&=1:LvDraw#.Text&=rgb(0,255,0)
                Case LvDraw#.SubItem&=2:LvDraw#.Text&=rgb(255,255,0)

            EndIf

        EndIf

    EndIf

ENDPROC'-------------------------------------------------------------

Var Lv&=create("gridbox",%hwnd,"Spalte 0;0;100;Spalte 1;0;100;Spalte 2;0;100",0,20,20,400,300)

whileloop 0,50

    addstring(lv&,"Test|Test|Test")

EndWhile

subclass %hwnd,1
SetStyle %hwnd,0,$14CF2000
~SetClassLong(%hwnd,~GCL_STYLE,(~GetClassLong(%hwnd,~GCL_STYLE)- ~CS_HREDRAW - ~CS_VREDRAW))
~Movewindow(%hwnd,Int(%maxx/2-WindowWidth&/2),Int(%maxy/2-WindowHeight&/2),WindowWidth&,WindowHeight&,1)

While 1

    Waitinput

    If %key = 2

        End

    EndIf

EndWhile

set("Fastmode",0)
 
Gruß Thomas
Windows XP SP2, XProfan X2
07/25/16  
 




Jörg
Sellmeyer
as far as i know, is not possible, a slot einzufärben, if yet quite no Entries in the Listbox are. You can but Leerstrings vorfüllen. then are The colours visible.
 
XProfan X3
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
07/25/16  
 




Ernst
@ Thomas - unfortunately nein; this example knew I already - functions even on Base Entries / Texthintergrundfarbe, I Yes not möchte; therefore (@Jörg) help too Leerstrings not, because the Lines then markierbar are, before what correctly. drinsteht.
I had me with Bitmaps what zusammengeschustert and I thought kann's plainer having - so can itself deceive
anyway thanks!
Regards serious
 
07/25/16  
 




Thomas
Freier
@ serious, so is it now time with one LV or of/ one Office scheduler.
You could but a chosen vain row, wenn's then not his should, immediate demarkern and the latest row with Content Mark.
 
Gruß Thomas
Windows XP SP2, XProfan X2
07/25/16  
 




Jörg
Sellmeyer
too old but strain Have I ne idea moreover:

with ~LockWindowUpdate(hdl&) ($H windows.ph) can you the window Lock and it again entsperren, once Entries drin are. though must You then the first Eintrage with SetText befüllen, because otherwise your Spaltenfarben again vanish.
~LockWindowUpdate(0) entsperrt again. one can always only one element Lock.
 
XProfan X3
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
05/24/18  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

8.009 Views

Untitledvor 0 min.
Walter05/04/24
Rainer Hoefs05/09/23
Sven Bader03/14/23
Peter Max Müller01/29/23
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie