FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour FWH2307: List View Unicode compatible
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
FWH2307: List View Unicode compatible
Posted: Sun Aug 27, 2023 09:12 AM

#include "FiveWin.ch" 

function Main() 
 
   local oWnd, oLvw, nOption := 1, oImageList

   DEFINE WINDOW oWnd TITLE "ListView Test"

   DEFINE IMAGELIST oImageList SIZE 32, 32

   oImageList:AddIcon( "console" )
   oImageList:AddIcon( "form" )
   oImageList:AddIcon( "library" )

   @ 1, 1 LISTVIEW oLvw SIZE 300, 300 PROMPTS "One" + CRLF + "ఒకటి", ;
                  "Two" + CRLF + "రెండు", "Three" + CRLF + "మూడు";
      ACTION MsgInfo( nOption )

   oLvw:SetImageList( oImageList )

   ACTIVATE WINDOW oWnd
   
   oImageList:End()

return nil/code]
Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FWH2307: List View Unicode compatible
Posted: Sun Aug 27, 2023 10:44 AM

Code (fw): Select all Collapse
#include "FiveWin.ch"

function Main()

   local oWnd, oLvw, nOption := 1, oImageList
   local oFont, aFiles

   aFiles := { "One_ఒకటి.pdf", "Two_두.docx", "Three_ตรัย.xlsx", ;
               "Four_चार.pptx" }

   DEFINE FONT oFont NAME "VERDANA" SIZE 0,-24

   DEFINE WINDOW oWnd TITLE "ListView Test"

   DEFINE IMAGELIST oImageList SIZE 32, 32

   WITH OBJECT oImageList
      AEval( aFiles, { |c| :AddImage( "." + cFileExt( c ) ) } )
   END 

   @ 0, 1 LISTVIEW oLvw SIZE 300, 300 PROMPTS aFiles[ 1 ], aFiles[ 2 ], ;
      aFiles[ 3 ], aFiles[ 4 ] ;
      ACTION MsgInfo( nOption )

   oLvw:SetImageList( oImageList )

   oLvw:SetFont( oFont )

   oLvw:SetStyle( 4 )

   ACTIVATE WINDOW oWnd CENTERED

   oImageList:End()

   RELEASE FONT oFont

return nil
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion