No subject


Thu Oct 26 18:16:52 CEST 2017


> > This was pitty and makes things more complex.
> >
> > Is it possible to get a couple of function added to the columnview in
> > later versions?
> > Columnview1.item[number].key
> > Columnview1.item[number].selected=3Dtrue/False
> >
> > or something similar?
> >
> > Regards Rohnny
>
> You can't have two keys for an item, only one. If you want a number to be=
 a
> key, just use it as key.
>
> MyColumnView.Add(number, text, picture...)
>
> What is the problem with that?
>
> --
> Benoit Minisini

How about next:

with MyColumnView
  .left=3D10
  .top=3D10
  [0,2].text=3D"hello"  'This can not be done
  [3,2].text=3D"gambas" 'this also not
  .border=3Dborder.sunken
end with


with MyColumnView
  .left=3D10
  .top=3D10
  MyColumnView[0,2].text=3D"useless using with"
  MyColumnView[3,2].text=3D"more useless for with"
  .border=3Dborder.sunken
end with

with MyColumnView
  with [3,2] 'alternative
    .xxx
    .Text=3D"stupid way"
    .yyy
  end with
end with



With the .Item property you can do=20
with MyColumnView
  .left=3D10
  .top=3D10
  .item[0,2].text=3D"hello"
  .item[3,2].text=3D"gambas2"
  .item[3].SubItem[4].text=3D"gambas4"

  with .Item[3,1]
    .text=3D"how nice"
  end with

  with .Item[1]
    with .SubItem[5]
      .text=3DSuper"
    end with
  end with=09

  .border=3Dborder.sunken
end with

The example Rohnny Stormo give was a bit wrong
> > Columnview1.item[number].key
> > Columnview1.item[number].selected=3Dtrue/False
I think he means Columnview1.item[row,column]

This should be then for control objects being accessed as array
   <object>[x  ] equals to <object>.Item[x]
   <object>[x,y] equals to <object>.Item[x,y]
   <object>[key] equals to <object>.Item[key]


With MS-VB you have ListView(row) can also accessed by ListView.item(row)
For the columns
ListView(row).SubItem(column) can accessed by ListView.item(row).SubItem(co=
lumn)


  vb.ListView.Item(row).SubItem(column).propertymethod
  vb.ListView(row).SubItem(column).propertymethod
  gb.Columnview1.Item[row,column].propertymethod
  gb.Columnview1[row,column].propertymethod
=20=20
And using .Items instead .Item is more correct in my view.
It is a set of Items where .Item suggest you have only one item.

To keep it simple and compatible, allow [x,y] been prefixed with .Item
or just the other way, access the array content as .Item[row,col] and
allow for missing .Item as option.
=20
Just my 3 cents

Ron
=09=09




More information about the Devel mailing list