Setting background color to a generic color

Our rich edit fields are set to clWindow when “editing/active” and when “saved/inactive” they are set to clSilver.  Highlighting is only allowed when editing. However if you highlight a section of text and then unhighlight it the text background is saved and when set to inactive the section that was unhighlighted is clWindow/white instead of clSilver.  This is the code I got from Peter Below which works great but I am looking for a generic back ground color that does not show up when the color is changed.

if LSetHighlite then
CF.crBackColor := NHighliteColor
else
CF.crBackColor := ColorToRGB(richedit1.Color);

Thanks.
0
Bill
9/5/2013 4:51:18 PM
embarcadero.delphi.vcl.using 2297 articles. 2 followers. Follow

2 Replies
1168 Views

Similar Articles

[PageSpeed] 29
Get it on Google Play
Get it on Apple App Store

Bill Beary wrote:

> Our rich edit fields are set to clWindow when “editing/active” and
> when “saved/inactive” they are set to clSilver.  Highlighting is only
> allowed when editing. However if you highlight a section of text and
> then unhighlight it the text background is saved and when set to
> inactive the section that was unhighlighted is clWindow/white instead
> of clSilver.  This is the code I got from Peter Below which works
> great but I am looking for a generic back ground color that does not
> show up when the color is changed.
> 
> if LSetHighlite then
> CF.crBackColor := NHighliteColor
> else
> CF.crBackColor := ColorToRGB(richedit1.Color);
> 
> Thanks.

The richedit control does not support the same kind of highlighting as
Word does. You can only use clSilver as highlight color, then it would
not show up with the control in inactive mode, otherwise you have to
live with what you get now.

-- 
Peter Below (TeamB)
0
Peter
9/5/2013 5:07:27 PM
> {quote:title=Peter Below wrote:}{quote}
 
> The richedit control does not support the same kind of highlighting as
> Word does. You can only use clSilver as highlight color, then it would
> not show up with the control in inactive mode, otherwise you have to
> live with what you get now.
> 
> -- 
> Peter Below (TeamB)

OK, Thanks.
0
Bill
9/5/2013 5:58:36 PM
Reply:

Similar Artilces:

Grid View Footer background Color based on either RowStyle background Color or or AlternatingRowStyle background Color
Hi Friends, As of my requirement,I have a grid view .Now the background color of the Footer of Grid view ,will have to be dynamic,i mean it will depend upon Row Style background color and AlternatingRowStyle background Color i.e, if the row above footer have row style ,then footer will have alternative row style background color and if the row above footer have alternative row style ,then footer will have row style background color. How can it be done. Regards, Ritesh This VB code in your GridView RowDataBound event may work for you: If e.Row.RowType = DataControlRo...

Setting Colors Using System Color Definitions
I want to be able to assign color to an object in a script, based on the way the user has their system colors defined. I know that the function RGB will allow me to specify a color, however I want to set the color of a field during runtime to one of the system colors, for example to "buttonface". When designing a datawindow, one is allowed to use the system colors as choices. I am assuming that this can also be done programmatically. Is there anyone who has done this, and if so how? Thanks for your help, Julie BUTTONFACE = 78682240 WINDOW_BACKGROUND = 10874349...

Why would my text box background color be different for different text boxes without setting the background color
I have a form that has about a half dozen seperate text boxes. I have not set anything on these text boxes other than width sizes.  For some reason however when I build the page shows that some of the text boxes has a yellow background and some have a white background.  Any ideas what the problem could be.  You can see in the code below that no background color is set.  BTW this is VS2008..I do impose a theme on the page but the theme sets a back color of white...so in theory there shoudnt be any yellow backcoloered text boxes.   Theme code<asp:TextBox runa...

Use Hex Color Value as Background color in Gridview
Hello All,  What I'm doing is pulling a dataset which includes a background color field.  What I want to do is set the background color of that column to the value of the HEX value returned for that record.  What I'm getting is a can not convert to object error. I am using a boundfield control for the column I want to color.   Thanks in advanced.  D/New .NET Programmer I don't know exactly how the HEX color value is saved in your DB. Sth like this should work:int winColor = 0x009536DD; // HEX A, R, G, B GridView1.Rows[e.RowIndex].Cells[0].Bac...

How to set color dynamically using html color codes??
 Hi,I want to do something like this: theGridView.FooterStyle.BackColor="#333333" , but having trouble finding right way to do it.How can the "#333333" be converted to a Color type?Thanks!  like this   theGridView.FooterStyle.BackColor = System.Drawing.ColorTranslator.FromHtml("#333333")  Mike Banavige~~~~~~~~~~~~Need a site code sample in a different language? Try converting it with: http://converter.telerik.com/...

How to set the background fill color and font color for the range?
Hi all, I had set the range as follow: range = worksheet1.get_Range("A137", "AG2"); range.Borders[XlBordersIndex.xlEdgeTop].LineStyle = Excel.XlLineStyle.xlContinuous; May I know how to set the background color and font color for this range? Please help. Thanks ...

superreview granted: [Bug 282141] Use system colors pref uses the wrong color for default background : [Attachment 174243] Patch
Christopher A. Aillon <caillon@gmail.com> has granted Christopher A. Aillon <caillon@gmail.com>'s request for superreview: Bug 282141: Use system colors pref uses the wrong color for default background https://bugzilla.mozilla.org/show_bug.cgi?id=282141 Attachment 174243: Patch https://bugzilla.mozilla.org/attachment.cgi?id=174243&action=edit ------- Additional Comments from Christopher A. Aillon <caillon@gmail.com> blizzard says sr=blizzard (looking over my shoulder) ...

superreview requested: [Bug 282141] Use system colors pref uses the wrong color for default background : [Attachment 174243] Patch
Christopher A. Aillon <caillon@gmail.com> has asked Christopher Blizzard <blizzard@mozilla.org> for superreview: Bug 282141: Use system colors pref uses the wrong color for default background https://bugzilla.mozilla.org/show_bug.cgi?id=282141 Attachment 174243: Patch https://bugzilla.mozilla.org/attachment.cgi?id=174243&action=edit ------- Additional Comments from Christopher A. Aillon <caillon@gmail.com> Use base, and get rid of an extra assignment of aColor (it gets assigned 0 in the default: branch of the switch) ...

superreview granted: [Bug 282141] Use system colors pref uses the wrong color for default background : [Attachment 175183] Patch
Dan Mosedale <dmose@mozilla.org> has granted Dan Mosedale <dmose@mozilla.org>'s request for superreview: Bug 282141: Use system colors pref uses the wrong color for default background https://bugzilla.mozilla.org/show_bug.cgi?id=282141 Attachment 175183: Patch https://bugzilla.mozilla.org/attachment.cgi?id=175183&action=edit ...

set text color or background color in a gridview based on values
Is there a way to set font-clor or background-color of cells in a gridview? For example:  If the cell value is 0 : set font color/background-color to red, if value =10 set font-color/background-color to green?  Thanks                                                 A sample by using RowDataBound event. Add  OnRowDataBound="gv_RowDataBou...

superreview cancelled: [Bug 163185] trees don't get default [backgour]colors from the OS : [Attachment 95676] Support -moz-initial for color and background color, and make tree.css use that.
Robert O'Callahan <roc@ocallahan.org> has cancelled timeless@myrealbox.com (working) <timeless@bemail.org>'s request for superreview: Bug 163185: trees don't get default [backgour]colors from the OS http://bugzilla.mozilla.org/show_bug.cgi?id=163185 Attachment 95676: Support -moz-initial for color and background color, and make tree.css use that. http://bugzilla.mozilla.org/attachment.cgi?id=95676&action=edit ------- Additional Comments from Robert O'Callahan <roc@ocallahan.org> clearing review flag until someone answers my question :-) ...

Set color using hex value instead of windows color?
Is there a way to set colors (in code) using hexidecimal values instead of windows colors: For example: UG1.Bands(0).RowAlternateStyle.BackColor = System.Drawing.Color.Honeydew Thanks! Traxon, UG1.Bands(0).RowAlternateStyle.BackColor = System.Drawing.ColorTranslator.FromHtml("#E3D5D5") Hope that helps... Many Thanks, Danny Cooper Aspose Excellent. Works great. Thank you very much. =)...

superreview granted: [Bug 420726] Use system background color for odd tree rows : [Attachment 308904] New version, use system bg color on odd rows
Robert O'Callahan (:roc) <roc@ocallahan.org> has granted Stefan <stefanh@bluebottle.com>'s request for superreview: Bug 420726: Use system background color for odd tree rows https://bugzilla.mozilla.org/show_bug.cgi?id=420726 Attachment 308904: New version, use system bg color on odd rows https://bugzilla.mozilla.org/attachment.cgi?id=308904&action=edit ------- Additional Comments from Robert O'Callahan (:roc) <roc@ocallahan.org> Why not make this -moz-oddrowbackground? I seem to recall GTK2 could use this. You just have to rename things, GTK2 supp...

superreview requested: [Bug 420726] Use system background color for odd tree rows : [Attachment 308904] New version, use system bg color on odd rows
Stefan <stefanh@bluebottle.com> has asked Robert O'Callahan (:roc) <roc@ocallahan.org> for superreview: Bug 420726: Use system background color for odd tree rows https://bugzilla.mozilla.org/show_bug.cgi?id=420726 Attachment 308904: New version, use system bg color on odd rows https://bugzilla.mozilla.org/attachment.cgi?id=308904&action=edit ------- Additional Comments from Stefan <stefanh@bluebottle.com> I surely need sr as well. ...

Web resources about - Setting background color to a generic color - embarcadero.delphi.vcl.using

Background Music (album) - Wikipedia, the free encyclopedia
^ Morris, Kurt. " Background Music – Overview" . Allmusic . Rovi Corporation . http://allmusic.com/album/background-music-r642918 . Retrieved ...

Android App OStream Speeds Up Facebook Experience By Synchronizing Content In Background
Facebook’s newly revamped Android application was rebuilt with a focus on speed, and startup oStream wants to help users of devices on that operating ...

Background for Dick Armey’s Endorsement of “Nothing for the Nation”
To truly grasp the profound nature of Dick Armey’s endorsement of Nothing for the Nation: Who Got What Out of Iraq, one must understand the events ...

Parse launches analytics tool, background jobs feature at first Developer Day conference
Parse , the Facebook-owned app development platform, held its first Developer Day conference in San Francisco Thursday, and the company launched ...

Easy Background Tasks in ASP.NET
As I work on the badge implementation for Stack Overflow, I needed a way to call the code that detects and awards the badges out of band. Traditionally ...

Wallpaper Studio Pro HD - Themes & Backgrounds for iPad on the iTunes App Store
Get Wallpaper Studio Pro HD - Themes & Backgrounds on the App Store. See screenshots and ratings, and read customer reviews.

Rolling background checks to protect children
BACKGROUND screening checks will be monitored in real-time to ensure people who commit offences cannot continue to work with children and other ...

More to selecting political background music than indiscriminate meandering
Gathering a song to use as a protest weapon can backfire.

Obama to Veto Bill Requiring Background Checks On Syrian Refugees; France Demands Tighter Controls, EU ...
... requirements " that would harm efforts to assist some of the world's most vulnerable people. The bill would add a new requirement for FBI background ...

FBI: Black Friday Background Checks ‘Shattered Single-Day Record’
FBI: Background Checks Surged to New Record on Black Friday

Resources last updated: 12/9/2015 6:13:01 PM