Label with Markup Forecolor problem |
Post Reply |
Author | |
gibra
Senior Member Joined: 31 October 2008 Location: Italy Status: Offline Points: 288 |
Post Options
Thanks(0)
Posted: 10 September 2014 at 8:27am |
SuitePro v.13.4.0 The Caption property contains the text below:
This work fine. But I can not run time to set the text as disabled! - Set Label1.Enabled = False doesn't wotk - Set Label1.Forecolor = vbGrayText (or any other color) doesn't work the forecolor still black. How to ?
|
|
gibra
CJ SuiteControl v: 13.x to 19.x Windows 10 64bit VS2019 - VB6.0 SP6 <a href="http://nuke.vbcorner.net/Home/tabid/36/language/en-US/Default.aspx" rel="nofollow">VS/VB 6.0 Installer v6.8 |
|
wlcabral
Groupie Joined: 25 April 2007 Location: Brazil Status: Offline Points: 72 |
Post Options
Thanks(0)
|
I think you should work with the caption
if Label1.Enabled Label1.caption = "<TextBlock HorizontalAlignment='Center' Foreground='Red' > <Bold>F</Bold>att. o <Bold>R</Bold>ic. </TextBlock>" else Label1..caption = "<TextBlock HorizontalAlignment='Center' Foreground='Gray' > <Bold>F</Bold>att. o <Bold>R</Bold>ic. </TextBlock>" endif I hope it helps... |
|
wlcabral
|
|
gibra
Senior Member Joined: 31 October 2008 Location: Italy Status: Offline Points: 288 |
Post Options
Thanks(0)
|
Thanks for the reply, but your code is not very functional for my purpose. Let me explain, I use this routine to enable / disable all the controls on a form:
It 'obvious that within a cycle, your suggestion, although it works, is not feasible because it requires to check for each control: - The type of control - If it supports the markup - If the EnableMarkup property is enabled, or not - If the Caption contains instructions to modify markup istructions - To parse the string because the markup instructions can be very different from one control to another. In short, it is not so simple. Thank again. |
|
gibra
CJ SuiteControl v: 13.x to 19.x Windows 10 64bit VS2019 - VB6.0 SP6 <a href="http://nuke.vbcorner.net/Home/tabid/36/language/en-US/Default.aspx" rel="nofollow">VS/VB 6.0 Installer v6.8 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |