Set CSS action not working

Just started using Construct 2? Post your questions here

Post » Mon Feb 02, 2015 2:38 am

I want to change the style of the button text, but even setting the color to red, it is still black...
What's wrong?
Image of how I am using attached bellow...
You do not have the required permissions to view the files attached to this post.
B
5
Posts: 10
Reputation: 247

Post » Mon Feb 02, 2015 9:01 am

What part doesn't work? It seems to work for me, in that I can definitely see that the text is now red.

Post a very simple .capx so we can check.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
131
S
29
G
81
Posts: 5,328
Reputation: 56,630

Post » Mon Feb 02, 2015 8:01 pm

dont use "on Start of layout",
try it with "Button: on created"
Read this:
yeah, i really like to say that you should "Read this:"
B
12
S
5
Posts: 138
Reputation: 1,490

Post » Mon Feb 02, 2015 8:31 pm

On Start of Layout makes no difference - still works (see attached).
You do not have the required permissions to view the files attached to this post.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
131
S
29
G
81
Posts: 5,328
Reputation: 56,630

Post » Mon Feb 02, 2015 8:38 pm

Works for me too, but if your project gets larger than it loading times change and you may will get a problem that you set the style of something that does not exist yet, thats why i sometimes have to use "wait 0sec".
So its a more safer/cleaner way to use "on created"
Read this:
yeah, i really like to say that you should "Read this:"
B
12
S
5
Posts: 138
Reputation: 1,490

Post » Sat May 23, 2015 1:53 pm

Got it working! The problem was not C2...
B
5
Posts: 10
Reputation: 247


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 5 guests