Results 1 to 4 of 4

Thread: User Control Proreties

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    I'm Doing a Fractal Control and I want to have a couple of properties as Complex Numbers, I have a UDT

    Code:
    Public Type Complex
    
        Real As Double
        Imaginary As Double
    
    End Type
    but this is pretty useless in the Design Time Property Window, I want to have a String in the Property Window like "4+3i" but at Runtime I want this to be my UDT.

    Is there any way of doing this, obviously I can do the conversions myself but How do I handle this conflict in Types?

    Thanks in adv

  2. #2
    Guest
    I don't really get what you're saying? You want to convert a String to a Double?
    [b]
    Code:
    Complex.Real = MyString

  3. #3
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Hehe, Sam, i'm sure you can do it with a classmodule, but for an udt, maybe you should use a function or something:

    Function cx2str$(Cx as complex)

    and

    Function str2cx(str$) as complex
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    No, That's not what I want at all.

    I have my User Defined Type Complex and a property

    Centre as Complex

    This is fine to do at runtime but you can't have a udt appear in the property window, it's expecting a string.

    How Do I controll the string interface to the property window without having the property a string at runtime?


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width