🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.basic.visual
4 messages
4 total messages Started by Henning Berggren J�rgensen Tue, 09 Oct 2001 18:11
"List" property category
#265
Author: Henning Berggren J�rgensen
Date: Tue, 09 Oct 2001 18:11
27 lines
1927 bytes
Hi there,

anyone knows how to make a custom property on a user control, which is shown
as a list in the property list... - like the list property in a listbox
where you can enter the list values (seperated with a Ctrl-Enter).

I've tried to make a property by this:

--- START ---
Private mList(10) As String

Public Property Get List(Index As Integer) As String
    List = mList(Index)
End Property

Public Property Let List(Index As Integer, Value As String)
    mList(Index) = Value
End Property
--- END ---

And set the Property Category (in the Procedure Attributes) to "List".

I thought this would have been it, but it doesn't seem to work.

What do I do wrong?

Regards, Henning
Re: "List" property category
#266
Author: Jan R�hmer Christensen
Date: Tue, 09 Oct 2001 21:03
25 lines
1811 bytes
> I've tried to make a property by this:
>
> --- START ---
> Private mList(10) As String
>
> Public Property Get List(Index As Integer) As String
>     List = mList(Index)
> End Property
I would have written it like thise
Public sub GetList(index as integer) as string
  GetList=mList(index)
End Sub

>
> Public Property Let List(Index As Integer, Value As String)
>     mList(Index) = Value
> End Property
> --- END ---

and thise like
Public Sub LetList(index as integer, Value as string)
  mlist(index) = Value
end sub

But i dont know.. havent testet it.. was just quick to reply!
Re: "List" property category
#267
Author: Henning Berggren
Date: Wed, 10 Oct 2001 07:01
27 lines
1824 bytes
> I've tried to make a property by this:
>
> --- START ---
> Private mList(10) As String
>
> Public Property Get List(Index As Integer) As String
>     List = mList(Index)
> End Property
I would have written it like thise
Public sub GetList(index as integer) as string
  GetList=mList(index)
End Sub
>
> Public Property Let List(Index As Integer, Value As String)
>     mList(Index) = Value
> End Property
> --- END ---
and thise like
Public Sub LetList(index as integer, Value as string)
  mlist(index) = Value
end sub

As functions and subs are not properties, the LetList and GetList
aren't visible in the property list window... - you have to use
property for this task.

- Henning
Re: "List" property category
#268
Author: Jan R�hmer Christensen
Date: Wed, 10 Oct 2001 07:44
5 lines
1493 bytes
> As functions and subs are not properties, the LetList and GetList
> aren't visible in the property list window... - you have to use
> property for this task.
>
Ok sorry then it no use :)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads