Click here to Skip to main content
15,887,175 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I have a label. I am making that Font Bold property to "True". And it displays correctly in design time.

But when i run the application the label shows the text in normal font(it will not be in bold letters).

All i am doing with this label is changing the text, making text string.empty and assigning text from resource file.


With Regards,
Posted
Comments
OriginalGriff 18-Aug-14 11:47am    
What environment?
Show us the code you use to create and modify the label.

I don't know the reason, but adding same property at runtime again will work fine. Thank you Sergey Alexandrovich Kryukov
 
Share this answer
 
Nobody will change the your font style, only you. Search your code properly, and you will find an answer.
We cannot do it for you because you did not bother to provide any code sample showing this problem.

—SA
 
Share this answer
 
Comments
yash35 18-Aug-14 14:51pm    
In designer.cs file this what added when i set font style to bold

resources.ApplyResources(this.lblDisplay, "lblDisplay");

but i was expecting something like =new font("Micro......", bold);

is there something wrong here. My debug at this point shows the bold property as false
Sergey Alexandrovich Kryukov 18-Aug-14 16:10pm    
Expecting? I cannot see anything bold here. The designer will generated to code according to what you instruct it do to, no less, no more. Is there any "bold" in actual. If it's not bold, make it bold.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900