Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Pete Sass
  Where is Pete Sass?
 Marathon, Ontario
 Canada
 Pete Sass
 To: Koen Piller
  Where is Koen Piller?
 Santpoort-Zuid
 Netherlands
 Koen Piller
 Tags
Subject: RE: ListBox I Guess I am Stupid
Thread ID: 416505 Message ID: 416533 # Views: 43 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Classes and Objects
Date: Tuesday, December 30, 2014 8:31:47 PM         
   


> > HI there again!
> >
> > This should be simple to do and I have diligently followed
> > now 3 point-by-point tutorials on how to setup a ListBox
> > with the so called MoverBar option.
> >
> > I have tried both binding the listbox to an array and a local
> > cursor.
> >
> > All goes well and I save the form and run it. When loaded the
> > MoverBars are not visible on the left side of the listbox at all
> > although the Moverbars property is set to .T.
> > Also loading the form once then when I go in to modify the
> > form again in Form Designer, the Moverbars are now not visible
> > in form designer and checking the MoverBars property it has
> > been change to .F. . It is now ReadOnly and will not allow you to
> > flip it back to .T.
> >
> > Delete the listbox, follow the tutorial all seems good run the
> > form once and again no MoverBars and the MoverBars property has
> > been forced back to .F. and cannot be changed back to .T.
> >
> > Below is a pic of the very basic form I am working on and
> > two listboxes being shown.
> > The small listbox below I just dropped on and set the MoverBars
> > to .T. Called List1
> > The larger listbox called ListReOrder looked just like the small
> > one until I ran the form once and then the Moverbars vanished and
> > loading again in forms designer the MoverBars property has been flipped
> > to .F. and the ListReorder listbox now appears as shown below.
> >
> >
> >
> > Also after running the form once the MoverBars property has not only been flipped to .F.
> > but now is ReadOnly and cannot be changed back to .T.
> >
> >
> > Seem like as soon as I bind an array or cursor to the listbox the MoverBars when
> > the form is run is flipped to .F. and now becomes ReadOnly.
> >
> > None of the tutorials show this behavior and the setup is quite straight forward,
> > that's why in my subject I added I guess I am stupid - lol
> >
> >
> > What on earth is causing this to happen??
> >
> >
> > Pete "the IceMan", from the Great White North of Canada.
> > www.marathongriffincomputers.com
>
> Hi Pete,
>
> I believe the best thing is to study the excellent sample you will find in 'Solutions' of a sorting moverbar,
> you may at the same time alse study the code to add a picture to your listbox.
>
> just type in your command window:
>
>
do HOME(2)+"solution\main.prg"

>
> and you are directed to the Solution-samples, look in the treeview for Controls->List box->Sort listbox items
> In case you cannot manage please upload your, nonworking code, I will try to correct.
>
> Regards,
>
> Koen


HI Koen,

I looked at that earlier today and have no problem getting that working.

What I somehow cannot get working is to load up a 12 record table in an
array and get the moverbars to show up. If I bind the array to the listbox
then the Moverbars property is flipped to .F. by the control automatically.
Vilhelm advised I have to use RowSourceType = 0 or 1 to get the MoveBars to
show up and remain as .T.
But if I do this then the array data will not show up in the listbox.

This to me does not seem to make any sense at all, but I have tried to bind
any array or local cursor several times and nope will not display the
MoveBars.

The tutorial shows setting up an array in the LOAD event of the form and
using it and clearly shows the MoverBars.

So here are my Listbox Data tab settings . . .

I have to have RowSourceType = 5 to use the array I created, but Vilhelm advised
has to be RowSourceType = 0 or 1

Running the form the array data sure is working, but you see no MoverBars - !!


So does this all mean that the MoverBars will not work unless you load up the listbox
items manually in a loop? If so there seems to be nothing to advise anywhere it will
not work bound to an array.


ANY IDEAS?


Pete "the IceMan", from the Great White North of Canada.
www.marathongriffincomputers.com

ENTIRE THREAD

ListBox I Guess I am Stupid Posted by Pete Sass @ 12/30/2014 3:04:48 PM
RE: ListBox I Guess I am Stupid Posted by Vilhelm-Ion Praisach @ 12/30/2014 4:23:19 PM
RE: ListBox I Guess I am Stupid Posted by Pete Sass @ 12/30/2014 8:17:26 PM
RE: ListBox I Guess I am Stupid Posted by Vilhelm-Ion Praisach @ 12/30/2014 10:26:08 PM
RE: ListBox I Guess I am Stupid Posted by Pete Sass @ 12/30/2014 11:32:48 PM
RE: ListBox I Guess I am Stupid Posted by Koen Piller @ 12/30/2014 6:52:38 PM
RE: ListBox I Guess I am Stupid Posted by Dan Baker @ 12/30/2014 7:21:12 PM
RE: ListBox I Guess I am Stupid Posted by Pete Sass @ 12/30/2014 8:31:47 PM
RE: ListBox I Guess I am Stupid Posted by Jun Tangunan @ 12/31/2014 12:15:06 AM
RE: ListBox I Guess I am Stupid Posted by Koen Piller @ 12/31/2014 5:22:13 PM