Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Change color of a specific item in a ListView

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
MMM-304
Expert Cheater
Reputation: 0

Joined: 17 Aug 2020
Posts: 166
Location: Milkey Way

PostPosted: Wed Aug 04, 2021 1:30 am    Post subject: Change color of a specific item in a ListView Reply with quote

How can i change color of an item (Caption and SubItems' Text) in ListView?
Back to top
View user's profile Send private message
Frouk
Master Cheater
Reputation: 5

Joined: 22 Jun 2021
Posts: 489
Location: mov dword ptr [Ukraine]

PostPosted: Wed Aug 04, 2021 1:55 am    Post subject: Reply with quote

In Lua Engine use
Code:
MainForm.function.Color = clGray --Instead of typing function type list view id
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Wed Aug 04, 2021 2:33 am    Post subject: Reply with quote

in OnCustomDrawItem you can set Sender.Canvas.Font.Color to the color you like it to draw with (do return true)

Same for OnCustomDrawSubItem

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
MMM-304
Expert Cheater
Reputation: 0

Joined: 17 Aug 2020
Posts: 166
Location: Milkey Way

PostPosted: Wed Aug 04, 2021 2:56 am    Post subject: Reply with quote

Dark Byte wrote:
in OnCustomDrawItem you can set Sender.Canvas.Font.Color to the color you like it to draw with (do return true)

Same for OnCustomDrawSubItem


but it changes the color of all items, i want to change the color of specific one, say on a button click
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Wed Aug 04, 2021 10:35 am    Post subject: Reply with quote

You have to check the current item Index and subitem and use that to determine the color to use
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
MMM-304
Expert Cheater
Reputation: 0

Joined: 17 Aug 2020
Posts: 166
Location: Milkey Way

PostPosted: Wed Aug 04, 2021 6:57 pm    Post subject: Reply with quote

Right. Thanks I got it
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites