Re: Anyone have a HOWTO on this requirement?
From: james (nospam_at_hypercon.net)
Date: 07/14/04
- Next message: Simon Smith: "Re: help!"
- Previous message: Geoff Jones: "Re: Hours"
- In reply to: Tilfried Weissenberger: "Re: Anyone have a HOWTO on this requirement?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 14 Jul 2004 12:35:00 -0500
You can just manually save and load the properties of the controls you want
to save. Reflection isn't going to help you if you dont know what you are
storing because you may attempt to store things you dont need to store and
re-storing them might cause issues if done in an incorrect order. Basically
what I would do is create an interface like IRestorable or some such and
then subclass all the controls you want to be able to restore, and implement
that interface in the control. Then your form can just go through all its
controls and call the store/restore method. Each control should know then
what it needs to do and how it needs to do it.
By the way, I use DevExpress's tools which can all store/restore themselves
JIM
"Tilfried Weissenberger" <tilli@weissenberger.at> wrote in message
news:1089750010.830191@news.aic.at...
> Thanks all for your responses.
>
> Unfortunately my example of the size/position is just for demonstration
> purpose. I inherit from a common form, which does that for me already. I
> just want to be able to add more attributes, such as column-width of
grids,
> width of dynamically positioned sliders etc. - I want to be able to pass a
> list of objects/properties to a function which will then either save the
> state to the registry (that's the easy part), or load it from there back
> into the properties (that's where I have the problem)!
>
> so it's not a conventional solution I require - I guess I have to use
> Reflection to do what I want - someone out there must know how this can be
> accomplished!
>
> Thanks for any further input!
>
> regards, Tilli
>
>
- Next message: Simon Smith: "Re: help!"
- Previous message: Geoff Jones: "Re: Hours"
- In reply to: Tilfried Weissenberger: "Re: Anyone have a HOWTO on this requirement?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|