I have tried that, not bad, but I want to find some "nicer" way.
>Boban-
>
>>>>I want to change property of Class from the method of Form that has been created from Class.
>>>>
>>>Let's clarify it, you want to change a property of a parent class from child class (form) method in runtime, Correct?
>>>
>>Yes. Is it possible?
>
>Usually in OOP, objects inherit from classes. You want the class to be modified by an instantiation of the class (the object).
>
>Sergey asked you for an example, and I'd be curious, too. This is non-standard, so far as I can tell, and it seems like a different approach might be required.
>
>For now I'll make up an example.
>
>Let's say you have a form class with a default height and width. Let's say you instantiate one of these forms, and the user resizes it, and then decides they like the default size and they click a button that says "Set as Default."
>
>I'd take Sergery and Gerry's suggestion and consider this a user preference sort of thing. Store the user's settings in a table. Change your baseclass to look for user preferences before setting height and width. Next time a form of this class is instantiated the base class will use the user's preferences or the default properties.
>
>This doesn't do what you want, which is to literally change the base class properties, but that's compiled code, right?
>
>Do do that you'd have to store the programmatic class in a memo, say, then compile it to an FXP when you want to use it.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only