Dan Sweeney
Posts: 0
Joined: Thu Feb 21, 2013 9:49 am

Change list item collapse block background and label font color

I have a list item with a collapse block and some labels.

My list item is called 'mListWOut', my collapse block within the list item is called 'mCollapseBlock'.
I have 2 labels within the collapse block being populated from a rest service.

What I need is to change the back colour of the collapse contect, and the fore color of label1, depending on the value of label2 within javascript.

Can you advise please?

Thanks

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Change list item collapse block background and label font color

Hello Dan!

This can be done with Custom CSS, check our doc http://docs.appery.io/documentation/w....
As to label's font color please take a look for the idea here http://stackoverflow.com/questions/15...

Dan Sweeney
Posts: 0
Joined: Thu Feb 21, 2013 9:49 am

Change list item collapse block background and label font color

Thanks for that.

I've got my label within the collapse block setting the color now.

I've put the code in the expand event because it doesn't seem to work in the value change event.

I do need to change the collapse block header text color too if possible and have tried putting the following in the value change event of the collapse block and the list item but it's not doing anything:

var thisItem = this;
Appery('mCollapseHeaderWOut',this).css('color', 'DarkOrange');

I've also put an alert in the value change event but it's not firing at all.

Any ideas?

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Change list item collapse block background and label font color

To change header font color create CSS with the following code:

code.ui-btn-text
{
color:red;
}
/code

Where do you store that value?

Just to add you can set up label's font color in Properties.

Return to “Issues”