Thread View: borland.public.delphi.aspdotnet.components.using
10 messages
10 total messages
Started by Man Of The Delphi
Sun, 14 May 2006 09:44
change color of control
Author: Man Of The Delphi
Date: Sun, 14 May 2006 09:44
Date: Sun, 14 May 2006 09:44
10 lines
1181 bytes
1181 bytes
Hi, How can i change color of textbox, button etc. I try following code Button1.BorderColor:='red'; but i get following error [Pascal Error] index.pas(56): E2010 Incompatible types: 'Color' and 'string' how can i convert string to color?
Re: change color of control
Author: Q Correll
Date: Sun, 14 May 2006 15:48
Date: Sun, 14 May 2006 15:48
24 lines
1334 bytes
1334 bytes
Man, | How can i change color of textbox, button etc. | I try following code | Button1.BorderColor:='red'; | | but i get following error | | [Pascal Error] index.pas(56): E2010 Incompatible types: 'Color' and | 'string' | | how can i convert string to color? Colors are special values that begin with "cl" try clRed (not a string). Button1.BorderColor := clRed; -- Q 05/14/2006 08:47:27 XanaNews Version 1.17.5.7 [Q's salutation mod]
Re: change color of control
Author: Man Of The Delphi
Date: Sun, 14 May 2006 19:16
Date: Sun, 14 May 2006 19:16
1 lines
1084 bytes
1084 bytes
i know it, but I get Undeclerated identifier error
Re: change color of control
Author: Q Correll
Date: Sun, 14 May 2006 20:35
Date: Sun, 14 May 2006 20:35
16 lines
1324 bytes
1324 bytes
Man, | i know it, but I get Undeclerated identifier error I just looked at your posted code line again. TButton doesn't have a Border property that I can see. What component are you using? It would seem that you may be using something that isn't correctly descended from a Class. Does the Caption, Font property have a Font Color property? -- Q 05/14/2006 13:31:45 XanaNews Version 1.17.5.7 [Q's salutation mod]
Re: change color of control
Author: Man Of The Delphi
Date: Mon, 15 May 2006 05:23
Date: Mon, 15 May 2006 05:23
2 lines
1298 bytes
1298 bytes
I'm using ASP.Net button control. it's not like TButton of Win32 component. button of ASP.NET have backcolor, BorderColor property and atc.
Re: change color of control
Author: Nick Hodges [TeamB]
Date: Mon, 15 May 2006 07:10
Date: Mon, 15 May 2006 07:10
11 lines
959 bytes
959 bytes
Man Of The Delphi wrote: > Button1.BorderColor:='red'; Button1.BorderColor := Color.Red; -- Nick Hodges -- TeamB Dunn Solutions Group -- http://www.dunnsolutions.com Read my Blog -- http://www.lemanix.com/nickblog
Re: change color of control
Author: Man Of The Delphi
Date: Mon, 15 May 2006 09:36
Date: Mon, 15 May 2006 09:36
23 lines
1568 bytes
1568 bytes
yes, it's running, but how can I use with a string variable like following code var str: string; begin str := 'blue'; Button1.BackColor := str; end; "Nick Hodges [TeamB]" <nickhodges@gmail.com>, haber iletisinde �unlar� yazd�:44682970$1@newsgroups.borland.com... > Man Of The Delphi wrote: > >> Button1.BorderColor:='red'; > > Button1.BorderColor := Color.Red; > > > -- > Nick Hodges -- TeamB > Dunn Solutions Group -- http://www.dunnsolutions.com > Read my Blog -- http://www.lemanix.com/nickblog
Re: change color of control
Author: Nick Hodges [TeamB]
Date: Mon, 15 May 2006 14:33
Date: Mon, 15 May 2006 14:33
25 lines
1424 bytes
1424 bytes
Man Of The Delphi wrote:
> var
> str: string;
> begin
> str := 'blue';
> Button1.BackColor := str;
> end;
Well, that's a little tougher. The string name has to be an exact match
of the color name.
procedure TWinForm118.Button1_Click(sender: System.Object; e:
System.EventArgs);
var
CCV: System.Drawing.ColorConverter;
begin
CCV := System.Drawing.ColorConverter.Create();
Self.BackColor := Color(ccv.ConvertFromString('Red'));
end;
--
Nick Hodges -- TeamB
Dunn Solutions Group -- http://www.dunnsolutions.com
Read my Blog -- http://www.lemanix.com/nickblog
Re: change color of control
Author: Q Correll
Date: Mon, 15 May 2006 14:43
Date: Mon, 15 May 2006 14:43
15 lines
1243 bytes
1243 bytes
Man, | I'm using ASP.Net button control. it's not like TButton of Win32 | component. button of ASP.NET have backcolor, BorderColor property | and atc. I don't "do" ASP or .NET, so I'm afraid I'm not going to be of much help. Sorry. -- Q 05/15/2006 07:42:40 XanaNews Version 1.17.5.7 [Q's salutation mod]
Re: change color of control
Author: Man Of The Delphi
Date: Mon, 15 May 2006 16:22
Date: Mon, 15 May 2006 16:22
1 lines
1033 bytes
1033 bytes
thank you a lot
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads