Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Cetin Basoz
  Where is Cetin Basoz?
 Izmir
 Turkey
 Cetin Basoz
 To: Samir H.
  Where is Samir H.?
 Yogyakarta
 Indonesia
 Samir H.
 Tags
Subject: RE: Show disabled Listbox item?
Thread ID: 268754 Message ID: 268780 # Views: 34 # Ratings: 0
Version: Visual FoxPro 9 Category: Forms
Date: Wednesday, July 14, 2010 3:28:07 PM         
   


> >
> > Yes of course I do. Use a grid:) With a listbox maybe instead you may try to add a picture to show current.
> >
> >
Public oForm
> > oForm = Createobject("sampleform")
> > oForm.Show()
> >
> > Define Class sampleform As Form
> > Add Object lst As ListBox With RowSourceType=3, ;
> > rowsource='select * from (_samples+"data\customer") into cursor xx nofilter'
> >
> > Add Object btns As CommandGroup With ;
> > Left = 200, Top = 40,;
> > buttoncount=2,;
> > autosize = .T.,;
> > command1.Caption="Disable",;
> > command2.Caption ="Enable"
> >
> > Procedure lst.Enabled_assign
> > Lparameters vNewval
> >
> > This.Picture( This.ListIndex ) = Iif(m.vNewval Or This.ListIndex = 0, "", ;
> > "C:\Program Files\Microsoft Visual FoxPro 9\Graphics\Icons\Arrows\point04.ICO")
> > This.Enabled = m.vNewval
> > Endproc
> >
> > Procedure btns.Click
> > Thisform.lst.Enabled = (This.Value = 2)
> > Endproc
> > Enddefine

> >
> > But did I tell you to use a grid instead:)
> >
> > Cetin Basoz
> >
> > .Net has got better.Think about moving - check my blog:
> > Blog (main)
> > Blog (mirror)
>
> It will work a picture too, but I'll keep my formatted label (till the day I follow your advice and switch back to a grid :)). I may use your idea in another situation, thank you.
>
> Am I really the only one who thinks a grid is ugly for a simple task such as just selecting an item?... In Windows, I don't see grids to select items: there are combos or listboxes.
>
> Regards
> Samir

Yes I think you are alone:) (No, there are other(s) I know too but that is because his/theirs inability to use the grid which is a very powerful control and harder to harness in VFP).
I believe you will end your being lonesome when you try to load a listbox with many items and then try to select one or more items:) Good luck on that day.

Cetin Basoz

.Net has got better.Think about moving - check my blog:
Blog (main)
Blog (mirror)

ENTIRE THREAD

Show disabled Listbox item? Posted by Samir H. @ 7/14/2010 11:50:44 AM
RE: Show disabled Listbox item? Posted by Cetin Basoz @ 7/14/2010 11:53:49 AM
RE: Show disabled Listbox item? Posted by Samir H. @ 7/14/2010 12:22:35 PM
RE: Show disabled Listbox item? Posted by Jun Tangunan @ 7/14/2010 12:29:42 PM
RE: Show disabled Listbox item? Posted by tushar @ 7/14/2010 12:52:56 PM
RE: Show disabled Listbox item? Posted by Samir H. @ 7/14/2010 12:56:12 PM
RE: Show disabled Listbox item? Posted by Cetin Basoz @ 7/14/2010 2:23:27 PM
RE: Show disabled Listbox item? Posted by Samir H. @ 7/14/2010 2:59:41 PM
RE: Show disabled Listbox item? Posted by Cetin Basoz @ 7/14/2010 3:28:07 PM
RE: Show disabled Listbox item? Posted by Tamar Granor @ 7/14/2010 10:27:52 PM
RE: Show disabled Listbox item? Posted by Samir H. @ 7/15/2010 4:05:24 AM
RE: Show disabled Listbox item? Posted by Koen Piller @ 7/14/2010 10:43:05 PM
RE: Show disabled Listbox item? Posted by Samir H. @ 7/15/2010 4:42:23 AM
RE: Show disabled Listbox item? Posted by Koen Piller @ 7/16/2010 12:43:41 AM
RE: Show disabled Listbox item? Posted by Tamar Granor @ 7/14/2010 10:29:15 PM
RE: Show disabled Listbox item? Posted by Samir H. @ 7/15/2010 4:11:40 AM
RE: Show disabled Listbox item? Posted by Tamar Granor @ 7/15/2010 10:42:33 PM