Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #9790 > unrolled thread

How to dispaly a part of a caption string in different color?

Started byClifford Järnry <clifford.jarnry@gmail.com>
First post2016-10-10 06:14 -0700
Last post2016-10-13 09:32 -0700
Articles 4 — 4 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  How to dispaly a part of a caption string in different color? Clifford Järnry <clifford.jarnry@gmail.com> - 2016-10-10 06:14 -0700
    Re: How to dispaly a part of a caption string in different color? Mathias <mathias.hakansson@consultec.se> - 2016-10-10 23:46 -0700
      Re: How to dispaly a part of a caption string in different color? "Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it> - 2016-10-11 09:29 +0200
    Re: How to dispaly a part of a caption string in different color? rkaplan328 <richard.d.kaplan@gmail.com> - 2016-10-13 09:32 -0700

#9790 — How to dispaly a part of a caption string in different color?

FromClifford Järnry <clifford.jarnry@gmail.com>
Date2016-10-10 06:14 -0700
SubjectHow to dispaly a part of a caption string in different color?
Message-ID<85cd9d19-5bbb-4dbe-bfae-65885e8fe2ac@googlegroups.com>
Hello.

I tried to find some information on how to display a part of a Caption in a different color in VO2.8sp4, but I have not found anything. Do anyone have a solution? 
Example:

SELF:Owner:Caption := "Write cString in red: "+cString+" and keep standard color of the rest of the string."

[toc] | [next] | [standalone]


#9792

FromMathias <mathias.hakansson@consultec.se>
Date2016-10-10 23:46 -0700
Message-ID<da41f216-a0e4-4ecd-97b4-38ae2639da44@googlegroups.com>
In reply to#9790
I have never seen a solution in VO, but there may be examples in C++. It's a case of "owner draw". Your program will have to paint the caption itself itstead of relying on windows standard. One version of MS office did this.

Found this MFC-sample with google...
http://www.codeproject.com/Articles/8313/CCustomBitmapButton-MFC-Bitmap-Button

/Mathias

Den måndag 10 oktober 2016 kl. 15:14:29 UTC+2 skrev Clifford Järnry:
> Hello.
> 
> I tried to find some information on how to display a part of a Caption in a different color in VO2.8sp4, but I have not found anything. Do anyone have a solution? 
> Example:
> 
> SELF:Owner:Caption := "Write cString in red: "+cString+" and keep standard color of the rest of the string."

[toc] | [prev] | [next] | [standalone]


#9794

From"Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it>
Date2016-10-11 09:29 +0200
Message-ID<nti4c2$bsf$1@dont-email.me>
In reply to#9792
I would say that the easiest and most flexible way is to use RTF text 
controls.

Arne Ortlinghaus
ACS Data Systems

"Mathias" <mathias.hakansson@consultec.se> schrieb im Newsbeitrag 
news:da41f216-a0e4-4ecd-97b4-38ae2639da44@googlegroups.com...
I have never seen a solution in VO, but there may be examples in C++. It's a 
case of "owner draw". Your program will have to paint the caption itself 
itstead of relying on windows standard. One version of MS office did this.

Found this MFC-sample with google...
http://www.codeproject.com/Articles/8313/CCustomBitmapButton-MFC-Bitmap-Button

/Mathias

Den måndag 10 oktober 2016 kl. 15:14:29 UTC+2 skrev Clifford Järnry:
> Hello.
>
> I tried to find some information on how to display a part of a Caption in 
> a different color in VO2.8sp4, but I have not found anything. Do anyone 
> have a solution?
> Example:
>
> SELF:Owner:Caption := "Write cString in red: "+cString+" and keep standard 
> color of the rest of the string."

[toc] | [prev] | [next] | [standalone]


#9801

Fromrkaplan328 <richard.d.kaplan@gmail.com>
Date2016-10-13 09:32 -0700
Message-ID<d5c9fb8f-acae-479e-88e3-35987ed1b391@googlegroups.com>
In reply to#9790
On Monday, October 10, 2016 at 9:14:29 AM UTC-4, Clifford Järnry wrote:
> Hello.
> 
> I tried to find some information on how to display a part of a Caption in a different color in VO2.8sp4, but I have not found anything. Do anyone have a solution? 
> Example:
> 
> SELF:Owner:Caption := "Write cString in red: "+cString+" and keep standard color of the rest of the string."

I've done this manually via the WED:

1. FixedText1 := "Caption string with RED word" in black
2. FixedText2 := "RED" in red, with very narrow margins
3. Check order of controls, FixedText2 must come after FixedText1
4. Manuever FixedText2 over FixedText1 so that the red word RED overlies the black version.  Some trial and error will be necessary.

A pain in the butt, as I recall!

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web