Dropdown color and textColor

Hi there…

Im kinda new to this programing and got a couple questions.
Ive been going through the documentation but cant seem to get the hang of it.
Ive downloaded the trail and setup everything nicely in VS2012.

LIGHTBOX, ive added several custom text boxes aswell as a dropdown box for background color.
I have 3 alternatives, default blue, green and red. When i pick one of these the color of my event changes to that color.
BUT, ive been trying to add a custom textColor to that same dropdown box aswell. That with no luck.

I want to have a white or black textColor when i choose anyone of them.
Anyone know how to set either black textColor to one and white textColor to another?
Or just change the custom textColor in events?

Everything saves great in DB. Got both color and txtColor set up.
All the coding is located in my controller, and i want the coding to take plage there.
Anyone with some sample codes or working options??

Best regards,
Noopy
(I can post the codes ive written when i arrive home from vacation is its impossible to figure this out)

Do you need dropdown to change both color and textColor?
If so, you may catch onEventSave event on the client, and assign textColor there, js: scheduler.attachEvent("onEventSave",function(id,data,is_new_event){ switch (data.color){ case 'red': data.textColor = ...; break; ... default: data.textColor = ""; break } return true; });

Hi.

Thanks for fast reply and a solution for me. I’ll try this out at once when i come home!
BTW, is it hard to set a new default textColor to the scheduler sample/trail? Is that possible?

I’ll post back when i arrive home next week on how this worked out for me :slight_smile:

Best regards,
Noopy

(License is possible for non-corporate use/users aswell?)

The easiest way is to override default css classes for events:

.dhx_cal_event div, .dhx_cal_event_line, .dhx_cal_event_clear{ background-color: #009966 !important; color: black !important; }

Hi again!

The solutions you came up with worked perfectly!
Thanks for quick help.

Best regards,
Noopy