Sign in to follow this  
Followers 0
Enforcer

Listview Cell Color

2 posts in this topic

#1 ·  Posted (edited)

Hello everyone I'm building interface for a small program that will monitor all printers in our office

and right now i got problems with painting background or at least text color in specified cell

I mean where is black [named B] column, I need to paint all text in this column in black,

where is cyan [named C] column, I need to paint in cyan color...

 

As I sayd I need to paint background of the cell or at least text color...

Will be even beter if someone can show me how to make text blink in specified cell (for blinker when cartrige will be empty)

 

I attached almost finished interface...

 

http://sendfile.su/814884

 

Sorry for my english and please help...

 

interfacep_6859848_8036604.png

 

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiStatusBar.au3>
#include <ListViewConstants.au3>
#include <WinAPI.au3>
#include <GuiListView.au3>
#include <GuiImageList.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>
#include <Inet.au3>


;Global $font = "Tahoma"
Global $font = "MS Sans Serif"
Global $spacerx = 100
Global $spacery = 27


if _Singleton("XOBSERVATORY-By-Bitnik",1) = 0 Then
Msgbox(0,"Warning","Program already running... ")
Exit
EndIf








#Region ### START Koda GUI section ### Form=Looky.kxf
$GUI = GUICreate("Observatory V1.5 by Binik", 1000+$spacerx, 681+$spacery, 228, 151)

$HEADER = GUICtrlCreatePic("Object.bmp", 0, 0, 0, 0)

$StatusBar1 = _GUICtrlStatusBar_Create($GUI)

$STAT = GUICtrlCreateInput(" Status: Idle...", 17, 113, 885+$spacerx, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_READONLY))
GUICtrlSetFont(-1, -1, 400, 0, $font)

$RESTART = GUICtrlCreateButton(" Restart ", 909+$spacerx, 110, 75, 25)
GUICtrlSetFont(-1, -1, 400, 0, $font)

GUICtrlCreateGroup("", 8, 96, 984+$spacerx, 49)




$LIST = GUICtrlCreateListView(" Printer Name |  IP Adress | Working Kit | B | Y | M | C | B | Y | M | C ", 8, 156, 984+$spacerx, 493+$spacery, BitOR($LVS_SHOWSELALWAYS, $LVS_SINGLESEL, $LVS_NOSORTHEADER, $LVS_REPORT))
_GUICtrlListView_SetExtendedListViewStyle($LIST, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_GRIDLINES, $LVS_EX_DOUBLEBUFFER))
GUICtrlSetColor(-1, 0x999999) ;779D31 COLOR
GUICtrlSetFont(-1, -1, 600, 0, $font) ;FONT

$LISTIMGX = _GUIImageList_Create(16, 16)
_GUIImageList_AddBitmap($LISTIMGX, @ScriptDir & "\Object.01")
_GUICtrlListView_SetImageList($LIST, $LISTIMGX, 1)

_GUICtrlListView_SetColumn($LIST, 0, "Printer Name", 210, 0)
_GUICtrlListView_SetColumn($LIST, 1, "IP Adress", 180, 2)
_GUICtrlListView_SetColumn($LIST, 2, "Working Kit", 210, 2)

_GUICtrlListView_SetColumn($LIST, 3, "B", 60, 2)
_GUICtrlListView_SetColumn($LIST, 4, "Y", 60, 2)
_GUICtrlListView_SetColumn($LIST, 5, "M", 60, 2)
_GUICtrlListView_SetColumn($LIST, 6, "C", 60, 2)


_GUICtrlListView_SetColumn($LIST, 7, "B", 60, 2)
_GUICtrlListView_SetColumn($LIST, 8, "Y", 60, 2)
_GUICtrlListView_SetColumn($LIST, 9, "M", 60, 2)
_GUICtrlListView_SetColumn($LIST, 10, "C", 60, 2)

GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###










_GUICtrlListView_AddItem($LIST, " FL 1.1 (CLR_CM6040)",0)
_GUICtrlListView_AddSubItem($LIST, 0, "999.999.999.999", 1, 1)
_GUICtrlListView_AddSubItem($LIST, 0, "Maintenance Kit - 100%", 2,0)

_GUICtrlListView_AddSubItem($LIST, 0, "100%", 3, 1)
_GUICtrlListView_AddSubItem($LIST, 0, "100%", 4, 1)
_GUICtrlListView_AddSubItem($LIST, 0, "100%", 5, 1)
_GUICtrlListView_AddSubItem($LIST, 0, "100%", 6, 1)

_GUICtrlListView_AddSubItem($LIST, 0, "100%", 7, 1)
_GUICtrlListView_AddSubItem($LIST, 0, "100%", 8, 1)
_GUICtrlListView_AddSubItem($LIST, 0, "100%", 9, 1)
_GUICtrlListView_AddSubItem($LIST, 0, "100%", 10, 1)


_GUICtrlListView_AddItem($LIST, " FL 1.1 (CLR_CM6040)",0)
_GUICtrlListView_AddSubItem($LIST, 1, "999.999.999.999", 1, 1)






While 1
$nMsg = GUIGetMsg()
Switch $nMsg



Case $GUI_EVENT_CLOSE
Exit


















EndSwitch
WEnd 
Edited by Enforcer

[RU] Zone

Share this post


Link to post
Share on other sites



After a quick search the below comes up a few times, Might be worth a look.


[font="'courier new', courier, monospace;"]Pastebin UDF | Prowl UDF[/font]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0