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


> >
> > What you say makes me down. I just changed from a grid to a listbox 3 days ago, and worked almost non stop to make this form work good.
> > The list is only here to select a student and edit some notes. During note editing, I disable the list so the user can't change the student whose notes he's editing. I think I'll keep the list for the moment.
> > Would you know a way to highlight the selected item?
> >
> > Regards
> > Samir
>
> 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

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