General discussion
-
CreatorTopic
-
February 27, 2000 at 7:04 pm #2083015
change color for a diasable field in acc
Lockedby legna_fg · about 24 years, 12 months ago
How can I change the disabled field colors?
Topic is locked -
CreatorTopic
All Comments
-
AuthorReplies
-
-
February 28, 2000 at 9:31 am #3900577
change color for a diasable field in acc
by ash_syed · about 24 years, 12 months ago
In reply to change color for a diasable field in acc
Hi ,
In response to your question ,
for instance u are having the textbox control or Label disabled , then u can
write a few statements to change its
backcolor or Forecolor using the RGB Function or the QBColor function .
Ex :
Let us assume the name of the label control is Label1
then :Label1.Forecolor = RGB(255,0,0)
in this case the color red is assigned to the Label
I hp it answers u r question
Thanks-
September 20, 2000 at 7:02 pm #3739791
change color for a diasable field in acc
by legna_fg · about 24 years, 5 months ago
In reply to change color for a diasable field in acc
The question was auto-closed by TechRepublic
-
-
February 29, 2000 at 5:11 am #3900537
change color for a diasable field in acc
by ghartlieb · about 24 years, 12 months ago
In reply to change color for a diasable field in acc
2 approaches come to mind:
1) Use a procedure to disable a control, passing the control as a paramater, which also changes the BackColor property to the color of your choice OR
2) Write a loop such as:
Dim Ctl as Control
Clr = RGB(0,255,0) ‘ or color of your choice
For Each Ctl in Me.Controls
if Ctl.Disabled then Ctl.BackColor = Clr
next CtlThis would work well in a Utilities module as a procedure used by many forms – just pass Me as a parameter.
This technique can be applied to using the Tag property to see if a control should be enable or disabled under certain conditions – you could set the color at that time as well.
-
September 20, 2000 at 7:02 pm #3739792
change color for a diasable field in acc
by legna_fg · about 24 years, 5 months ago
In reply to change color for a diasable field in acc
The question was auto-closed by TechRepublic
-
-
March 1, 2000 at 4:09 am #3900494
change color for a diasable field in acc
by ghartlieb · about 24 years, 12 months ago
In reply to change color for a diasable field in acc
A correction to my previous answer:
You would use: IF NOT Ctl.Enabled THEN Ctl.BackColor = Clr
-
September 20, 2000 at 7:02 pm #3739793
change color for a diasable field in acc
by legna_fg · about 24 years, 5 months ago
In reply to change color for a diasable field in acc
The question was auto-closed by TechRepublic
-
-
April 27, 2000 at 5:52 am #3899263
change color for a diasable field in acc
by vladm · about 24 years, 10 months ago
In reply to change color for a diasable field in acc
For change of color of Control on any condition, for example, accessible / inaccessible it is necessary to use change of properties Color and ForeColor on event OnRecord, which occurs with transition between records of a source of the given form, and also with opening the form.
If it is necessary to trace a condition of an element of management during manipulation with the form – use event AfterUpdate of appropriate Control.
These actions cannot be carried out, when the form is in a tape kind- viewing of several records simultaneously.-
September 20, 2000 at 7:02 pm #3739794
change color for a diasable field in acc
by legna_fg · about 24 years, 5 months ago
In reply to change color for a diasable field in acc
The question was auto-closed by TechRepublic
-
-
August 24, 2000 at 1:41 am #3892672
change color for a diasable field in acc
by donq · about 24 years, 6 months ago
In reply to change color for a diasable field in acc
If Me.[disabledFieldName].Disabled = “True” Then [disabledFieldName].Backcolor = 12632256 Else [disabledFieldName].Backcolor = 16777215 EndIf
I always call up the color box and paste the color # I want in the clipboard, then open my code snippet and copy the clipboard contents behind the equal sign. I use this inside GotFocus() and LostFocus() regularly to turn the field with focus background color to white, and then back to my Forms primary color so the user never has to hunt for a flashing cursor. Use any colors you want this way without screwing up??? Have fun Don Quigg
-
September 20, 2000 at 7:02 pm #3739795
change color for a diasable field in acc
by legna_fg · about 24 years, 5 months ago
In reply to change color for a diasable field in acc
The question was auto-closed by TechRepublic
-
-
September 20, 2000 at 7:02 pm #3739790
change color for a diasable field in acc
by legna_fg · about 24 years, 5 months ago
In reply to change color for a diasable field in acc
This question was auto closed due to inactivity
-
-
AuthorReplies