<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[My Visual Database — Changing Disabled Field Font Color]]></title>
		<link>https://myvisualdatabase.com/forum/viewtopic.php?id=7743</link>
		<atom:link href="https://myvisualdatabase.com/forum/extern.php?action=feed&amp;tid=7743&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Changing Disabled Field Font Color.]]></description>
		<lastBuildDate>Sat, 11 Sep 2021 21:26:41 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Changing Disabled Field Font Color]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=42198#p42198</link>
			<description><![CDATA[<p>Awesome.&nbsp; Thanks vovka3003.&nbsp; That&#039;s even more simple than the scripts I have found.</p>]]></description>
			<author><![CDATA[null@example.com (joshuA)]]></author>
			<pubDate>Sat, 11 Sep 2021 21:26:41 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=42198#p42198</guid>
		</item>
		<item>
			<title><![CDATA[Re: Changing Disabled Field Font Color]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=42195#p42195</link>
			<description><![CDATA[<p>Только скрипт.<br /></p><div class="codebox"><pre><code>procedure Mailto(Sender: TObject);
begin
   OpenFile(&#039;mailto:&#039;+TdbEdit(Sender).Text,&#039;&#039;);
end;

procedure EdMouseEnter (Sender: TObject);
begin
  with TEdit(Sender) do
  begin
      if pos(&#039;@&#039;,Text) = 0 then exit;
      Font.Color := clBlue;
      Font.Style :=  fsUnderline;
      Cursor := crHandPoint;
      OnDblClick := @Mailto;
  end;
end;

procedure EdMouseLeave(Sender: TObject);
begin
 with TEdit(Sender) do
  begin
       Font.Color := clDefault;
       Font.Style :=   0;
       Cursor := crDefault;
       OnDblClick := nil;
   end;
end;

procedure IsMailFields(Flds:array of TdbEdit);
var i:integer;
begin
  for i:=0 to  length(Flds)-1 do
  begin
    Flds[i].OnMouseEnter := @EdMouseEnter;
    Flds[i].OnMouseLeave := @EdMouseLeave;
  end;
end;

begin



 IsMailFields([
       // Здеь поля email через запятую:
      Form1.Edit1,
      Form1.Edit2
      // ...
 ]);

end.</code></pre></div><p><span class="postimg"><img src="https://i.imgur.com/LP2ew6I.png" alt="https://i.imgur.com/LP2ew6I.png" /></span></p>]]></description>
			<author><![CDATA[null@example.com (vovka3003)]]></author>
			<pubDate>Sat, 11 Sep 2021 18:52:44 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=42195#p42195</guid>
		</item>
		<item>
			<title><![CDATA[Re: Changing Disabled Field Font Color]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=42194#p42194</link>
			<description><![CDATA[<p>While experimenting further with this, I noticed that MVD will create a clickable link to http urls.&nbsp; This is neat, but I was trying to get this working for mailto links as well...<br />.<br />I found other posts that have done this (opening an e-mail client) using scripts, but I was wondering if there was a way to get MVD to do it natively before I use scripting for it.<br />.<br />I have tried appending the mailto: portion to the front of the field as well as saving it in the field data, but neither seem have the same result as the http:// links do.<br />.<br />Any thoughts?</p>]]></description>
			<author><![CDATA[null@example.com (joshuA)]]></author>
			<pubDate>Sat, 11 Sep 2021 16:40:04 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=42194#p42194</guid>
		</item>
		<item>
			<title><![CDATA[Re: Changing Disabled Field Font Color]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=42191#p42191</link>
			<description><![CDATA[<p>Hi derek,<br />.<br />That&#039;s what I was looking for.&nbsp; I overlooked the ReadOnly property.&nbsp; I was getting it confused with the Enabled property which doesn&#039;t allow the field text to be selected.&nbsp; This way the contents may still be selected and copied.<br />.<br />Many thanks!</p>]]></description>
			<author><![CDATA[null@example.com (joshuA)]]></author>
			<pubDate>Sat, 11 Sep 2021 13:33:33 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=42191#p42191</guid>
		</item>
		<item>
			<title><![CDATA[Re: Changing Disabled Field Font Color]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=42187#p42187</link>
			<description><![CDATA[<p>Hi Joshua,<br />Once you&#039;ve set a field to enabled := false then I don&#039;t believe you can change the font colour;&nbsp; you can however, change the background colour which might be an option.<br />If it&#039;s the actual font colour you want to change, instead of setting the field to enabled := false, you could set the field to readonly := true;&nbsp; this does allow you to change the font colour.<br />Be aware that this only works with edit fields, memo fields and comboboxes.&nbsp; If I remember rightly, it doesn&#039;t work with checkboxes nor dates (a Windows restriction rather than MVD, I believe).<br />Derek.</p>]]></description>
			<author><![CDATA[null@example.com (derek)]]></author>
			<pubDate>Sat, 11 Sep 2021 11:30:03 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=42187#p42187</guid>
		</item>
		<item>
			<title><![CDATA[Changing Disabled Field Font Color]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=42183#p42183</link>
			<description><![CDATA[<p>Hi all,<br />.<br />I was hoping someone has tried this before, but I was unable to find any related posts.<br />.<br />I&#039;m trying to change the font color for a field that has the enable property set to false.<br />.<br />These are the things that I have tried already:<br /></p><ul><li><p>manually changing the font color in the field&#039;s property</p></li><li><p>using an OnChange event for the tablegrid related to the field</p></li></ul><p>.<br />I don&#039;t have any other ideas to try, so I thought I would ask.<br />.<br />Normally shading the disabled fields is desirable, but I have a case where a different color would be helpful.</p>]]></description>
			<author><![CDATA[null@example.com (joshuA)]]></author>
			<pubDate>Sat, 11 Sep 2021 00:45:48 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=42183#p42183</guid>
		</item>
	</channel>
</rss>
