🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.basic.visual.misc
Article #420

Re: Control creation

#420
From: Bob Butler
Date: Tue, 16 Sep 1997 00:00
56 lines
3356 bytes
Lukas Casar <casar@integia.cz> wrote in article
<341E897E.3749@integia.cz>...
> Hello everyone, I've got serious problems in control creation...
> 
> 1) How to write to runtime-read-only properties of control I'm using as
> the base of my new control.
>    I need to create my own control based on standard ListView. ListView
> has for example 'HideSelection' property, which is read-only in runtime.
> But when I'm creating own control based on ListView, this ListView is in
> 'runtime' mode while my new control is in design-time in VB development
> environment. It means that I can't change this property of ListView in
> design-time of my new control, because that ListView in already in
> runtime mode. How to solve this ?

Unless you want to build your own version from scratch, the simplest way to
implement this would be to place two ListView controls on your user control
and set the HideSelection property True on one, False on the other.  Put
your own HideSelection property on your usercontrol and toggle visibility
on the ListViews so that the desired one shows whenever the HideSelection
property changes.  You must remember to update all other properties on the
two controls in synch.  It's crude, but effective.

> 
> 2) Problem with PropBag (Property Bag). I need to define own properties
> for each column in original ListView (BO property bounding and other new
> features). In fact this requires to store a collection or an array to
> the PropBag. But when I tried to use collection, it displayed 'System
> error - Such interface not supported' message after WriteProperties. So
> I tried to use an array, but I wasn't able to read it then by
> ReadProperties, because it isn't possible to write something like
> MyArray=PropBag.ReadProperties("MyArray") - you can't assign a array by
> "=".

You need to convert your array to a series of individual properties in the
read/write routines:
For x=lbound(myarray) to ubound(myarray)
  myarray(x)=propbag.readproperties("myarray" & cstr(x))
Next x
You store it in an array, but record it as 'myarray1', 'myarray2', etc

> 
> Thanks for any advice
>    Lukas Casar
> 
> 
> PS: Please reply to casar@integia.cz, I don't read news often...
>

-- 
Please reply through the newsgroup.  The reply e-mail
address is garbage to reduce the spam rate. 



 
Technical Details
Message-ID: <01bcc2a7$9f597be0$529ede80@bbutlerLT.us.dg.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <341E897E.3749@integia.cz>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10c949,56c43aebb403b64c,start
X-Google-Attributes: gid10c949,public
X-Google-Thread: 10b213,56c43aebb403b64c,start
X-Google-Attributes: gid10b213,public
X-Google-Thread: 110e3b,56c43aebb403b64c,start
X-Google-Attributes: gid110e3b,public
X-Google-Thread: f645d,56c43aebb403b64c,start
X-Google-Attributes: gidf645d,public
X-Google-Thread: 113d8f,56c43aebb403b64c,start
X-Google-Attributes: gid113d8f,public
X-Google-Thread: 108062,56c43aebb403b64c,start
X-Google-Attributes: gid108062,public
From: "Bob Butler" <slowdeath@allspammers>
Subject: Re: Control creation
Date: 1997/09/16
Message-ID: <01bcc2a7$9f597be0$529ede80@bbutlerLT.us.dg.com>
X-Deja-AN: 272951238
References: <341E897E.3749@integia.cz>
Organization: Data General
Newsgroups: comp.lang.basic.visual.misc,comp.lang.basic.misc,comp.lang.basic.visual,cz.comp.lang.basic.visual,microsoft.public.vb.controls,microsoft.public.vb.controls.creation