Accessing design time properties in run time 
Author Message
 Accessing design time properties in run time

I am making a control and I would like to be able to access the
BackColor property of my control at run-time from within the control's
own code. I was going to make my own property which would change the
BackColor property as well as do a few related things.
However, when I reference the control in code (either by referencing
the Me object or by referencing an object variable that is set to the
control) the only properties I get are the ones that I have created
for the control. So I tried putting in:
        ThisControl.BackColor=col
anyway and when it hit that line it doesn't recognize the BackColor
property. Naturally, I can set this property of the control at design
time, but how can I access it in the control's code?

Ed



Tue, 13 Aug 2002 03:00:00 GMT  
 Accessing design time properties in run time
Try Ambient.BackColor
Quote:

> I am making a control and I would like to be able to access the
> BackColor property of my control at run-time from within the control's
> own code. I was going to make my own property which would change the
> BackColor property as well as do a few related things.
> However, when I reference the control in code (either by referencing
> the Me object or by referencing an object variable that is set to the
> control) the only properties I get are the ones that I have created
> for the control. So I tried putting in:
> ThisControl.BackColor=col
> anyway and when it hit that line it doesn't recognize the BackColor
> property. Naturally, I can set this property of the control at design
> time, but how can I access it in the control's code?

> Ed




Tue, 13 Aug 2002 03:00:00 GMT  
 Accessing design time properties in run time
Try with UserControl.BackColor.

--
Eduardo A. Morcillo
http://www.domaindlx.com/e_morcillo



Tue, 13 Aug 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Saving properties of ActiveX control from design time to run time

2. Design-time properties in Run-time Controls

3. Design time or run time, setting properties

4. Assign a treeview at design run time to other at design time

5. Code running in design time or run-time?

6. web service and updating web reference with vb.net design time vs run time

7. getting run-time behavior of a contained control in a user control at design time

8. web service and updating web reference with vb.net design time vs run time

9. Design time vs Run time

10. Run Time vs Design Time - No Current Record

11. MsgBox pauses App at Design time but not run time

12. Design Time vs Run Time

 

 
Powered by phpBB® Forum Software