Select elemet from listview

Select elemet from listview

Postby Marcelo Via Giglio » Wed Dec 30, 2009 1:47 am

Hello,

I didn't find the way to select a element from listview, I tryed sending message, but without success

SendMessage( oLvw:hWnd, LVM_SELECTITEM, nElemento, 0 )

some idea?

regards

Marcelo
Marcelo Via Giglio
 
Posts: 1064
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

Re: Select elemet from listview

Postby nageswaragunupudi » Wed Dec 30, 2009 1:59 am

oLvw:nOption is the selected item
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10625
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Select elemet from listview

Postby nageswaragunupudi » Wed Dec 30, 2009 3:12 am

I am able to create listview control on Window.
But when I try to create listview control from source code in a dialog I am getting 'can not create dialog' error. Is there any fix ?
Code: Select all  Expand view
#include "FiveWin.Ch"

//------------------------------------------------------------------//

function Main()

   local oDlg, oLst
   local n := 1

   DEFINE DIALOG oDlg SIZE 400,400 PIXEL TITLE 'ListView'

   @ 10,10 LISTVIEW oLst ;
      PROMPTS 'One', 'Two', 'Three' ;
      SIZE 200,100 PIXEL OF oDlg

   ACTIVATE DIALOG oDlg CENTERED


return ( 0 )

//------------------------------------------------------------------//
 

Can the above code made to work?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10625
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Select elemet from listview

Postby Marcelo Via Giglio » Wed Dec 30, 2009 3:20 am

nageswaragunupudi ,

thanks for response, but what I want is not to know what item is selected, I want to define the selected item, some thing like oLvw:setSelect( nItem )

I hope now I am clear

regards

Marcelo
Marcelo Via Giglio
 
Posts: 1064
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 113 guests