I want the dropdown list to auto change color.
example: i have 0:OFF , 1:ON and 2:ERROR.
I want OFF show as black color in table value, ON show as green and ERROR show as red.
whenever the value change so do the color change.
any idea?
Dropdown list + auto change color?
- MikinaneShindouda
- Expert Cheater
- Posts: 55
- Joined: Mon Sep 25, 2017 7:30 pm
- Reputation: 41
- TheyCallMeTim13
- Administration
- Posts: 1542
- Joined: Fri Mar 03, 2017 12:31 am
- Reputation: 809
Re: Dropdown list + auto change color?
You could use a timer, and check the value then change the memory records color as needed. Or you could use "OnGetDisplayValue" to set the color of the memory record.
- MikinaneShindouda
- Expert Cheater
- Posts: 55
- Joined: Mon Sep 25, 2017 7:30 pm
- Reputation: 41
Re: Dropdown list + auto change color?
im just start cheating 2 days ago. i need a full tutorial how to do it. plsTheyCallMeTim13 wrote: ↑Sun Mar 21, 2021 1:20 pmYou could use a timer, and check the value then change the memory records color as needed. Or you could use "OnGetDisplayValue" to set the color of the memory record.

- TheyCallMeTim13
- Administration
- Posts: 1542
- Joined: Fri Mar 03, 2017 12:31 am
- Reputation: 809
- MikinaneShindouda
- Expert Cheater
- Posts: 55
- Joined: Mon Sep 25, 2017 7:30 pm
- Reputation: 41
Re: Dropdown list + auto change color?
how is this help me
Re: Dropdown list + auto change color?
This is plenty of help already as it is. You can refer to Lua tutorials on the main CEF forums, but the general pseudocode could:TheyCallMeTim13 wrote: ↑Sun Mar 21, 2021 1:20 pmYou could use a timer, and check the value then change the memory records color as needed. Or you could use "OnGetDisplayValue" to set the color of the memory record.
Code: Select all
--sets function for all memrecs, but you can alternatively check for specific indexes or descriptions if you don't want that
al = getAddressList()
for i = 1, al.Count then
al[i].OnGetDisplayValue = function(mr, value)
if value == 0 then
mr.Color = integer for black # i'm guessing you can specify these using hex values like so 0x00000000
elif value == 1 then
mr.Color = integer for green #0x00FF00
elif value == 2 then
mr.Color = integer for red #0xFF0000
end
end

Who is online
Users browsing this forum: Shrakend