MediaCenter

MediaCenter

Postby vilian » Tue Mar 31, 2020 10:36 pm

Hi guys,

I have to do something like this image bellow. Do you know what is the best way ?
Image
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 972
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: MediaCenter

Postby cnavarro » Tue Mar 31, 2020 11:30 pm

Try with XBrowse without headers, footers, or lines
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: MediaCenter

Postby vilian » Wed Apr 01, 2020 12:00 am

Ok, but how could I change the content of a cell when mouse is over it ? As you could see in the image.
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 972
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: MediaCenter

Postby nageswaragunupudi » Wed Apr 01, 2020 3:23 am

I can not see the image.
Can you send it to my email?
Regards

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

Re: MediaCenter

Postby nageswaragunupudi » Wed Jul 15, 2020 3:18 pm

Please try this and improve upon it as you require:
Code: Select all  Expand view
#include "fivewin.ch"

function Main()

   local oWnd, aImage, oFont, n, nRow, nCol
   local oPanel
   local aSource := { "c:\fwh\bitmaps\olga1.jpg", "c:\fwh\bitmaps\olga2.jpg", ;
                      "c:\fwh\bitmaps\sea.bmp", "c:\fwh\bitmaps\back.bmp", ;
                      "c:\fwh\bitmaps\hires\office.bmp", "c:\fwh\bitmaps\hires\earth.bmp", ;
                      "c:\fwh\bitmaps\cliplogo.bmp", "c:\fwh\bitmaps\007.bmp"  }
   local w, h

   aImage   := Array( Len( aSource ) )

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-20
   DEFINE WINDOW oWnd VSCROLL HSCROLL

   w  := 650
   h  := Round( Len( aSource ) / 2, 0 ) * 450

   oPanel   := TPanel():New( 0, 0, h, w, oWnd )

   oWnd:oVScroll:SetRange( 0, h - 400 )
   oWnd:oHScroll:SetRange( 0, w - 300 )

   nRow  := 0
   nCol  := 0

   for n := 1 to Len( aSource )

      aImage[ n ] := ImageControl( oPanel, nRow, nCol, aSource[ n ] )

      if nCol == 0
         nCol  += 350
      else
         nCol  := 0
         nRow  += 450
      endif

   next
   aImage[ 1 ]:bPainted := { |hDC| FW_SayText( hDC, "HELLO", { 20,20,60,300 }, "", oFont, CLR_YELLOW ) }

   oWnd:oVScroll:bPos  := { |n| oPanel:nTop := -n, oWnd:oVScroll:SetPos( n ) }
   oWnd:oVScroll:bTrack:= { |n| oPanel:nTop := -n, oWnd:oVScroll:SetPos( n ) }
   oWnd:oHScroll:bPos  := { |n| oPanel:nLeft := -n, oWnd:oHScroll:SetPos( n ) }
   oWnd:oHScroll:bTrack:= { |n| oPanel:nLeft := -n, oWnd:oHScroll:SetPos( n ) }

   ACTIVATE WINDOW oWnd

   RELEASE FONT oFont

return nil


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

static function ImageControl( oWnd, nRow, nCol, cSource )

   local oImage

   @ nRow, nCol XIMAGE oImage SOURCE cSource SIZE 300,400 OF oWnd

return oImage

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


In the above code, please change "c:\fwh" to your fivewin path.
Regards

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

Re: MediaCenter

Postby vilian » Wed Jul 15, 2020 5:00 pm

Thank you,
It's exactly I need :)
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 972
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 39 guests