|
-
May 15th, 2001, 12:49 AM
#1
Thread Starter
Member
CREATING Properties
Is there a way to give an object more properties?---->
Take any object,form, etc etc that has so many properties and give it another property that can be altered?
I'm guessing this is a wee bit complicated
-
May 15th, 2001, 01:05 AM
#2
Thread Starter
Member
-
May 15th, 2001, 01:17 AM
#3
No it's not.
You would have to have the sourcecode(C++) for the object, and the recompile it, with your changes included.
But what is it, that you wan't to do with these new properties?
Perhaps there is another way.
-
May 15th, 2001, 01:28 AM
#4
Registered User
Of course, it is easy.
By adding a public variable declaration in at the top of a form, you are adding a property to that form.
-
May 15th, 2001, 01:33 AM
#5
I mean that gives you the variable name in the lists, but it won't do anything to the form, unless you loop to check that the variable has changed (?)
-
May 15th, 2001, 01:36 AM
#6
I was whinking more in generel.
You can create a new "property" for a form, but you can't do this to objects in generel like buttons, listviews, etc.
And adding the new property for the form, will only work for that particually form, and not forms in generel.
-
May 15th, 2001, 01:37 AM
#7
Registered User
It is better to use property get and let to create custom properties so you can control the setting and getting of the value.
e.g. Create a custon property for a form, call it frm_Id:
Code:
Private frm_id As Long
Public Property Get Id() As Long
Id = frm_id
End Property
Public Property Let Id(SubmitId As Long)
frm_id = SubmitId
End Property
-
May 15th, 2001, 01:41 AM
#8
Doing that to store data is no drama. But I think what we mean here is actually physical changes to the appearance of the form.
-
May 15th, 2001, 02:36 AM
#9
Member
not all properties change the appearance of something.
Matt Bradbury
An optimist will claim the glass is half full.
A pessimist that it is half empty.
I just think the glass is too big.
-
May 15th, 2001, 04:12 AM
#10
Thread Starter
Member
¿
I was actually referring to changing the properties of objects. Shouldnt really have mentioned forms. I was expecting an answer something like altering its source code like AIS said.
So c++ is the most common for creating controls?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|