FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Select elemet from listview
Posts: 1088
Joined: Fri Oct 07, 2005 03:33 PM
Select elemet from listview
Posted: Wed Dec 30, 2009 01: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

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Select elemet from listview
Posted: Wed Dec 30, 2009 01:59 AM

oLvw:nOption is the selected item

Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Select elemet from listview
Posted: Wed Dec 30, 2009 03: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 (fw): Select all Collapse
#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
Posts: 1088
Joined: Fri Oct 07, 2005 03:33 PM
Re: Select elemet from listview
Posted: Wed Dec 30, 2009 03: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

Continue the discussion