Page 1 of 1

Placing a PNG as the background of a dialog

PostPosted: Fri Mar 16, 2018 3:04 pm
by Antonio Linares
Code: Select all  Expand view
#include "FiveTouch.ch"

function Main()

   local oDlg, oLabel

   DEFINE DIALOG oDlg ;
      SIZE ScreenWidth(), ScreenHeight()

   oLabel = QLabel( oDlg )
   oLabel:Move( 0, 0 )
   oLabel:Resize( ScreenWidth(), ScreenHeight() )
   oLabel:SetPixmap( QPixmap( DownloadLocation() + "\autobus.png" ):Scaled( ScreenWidth(), ScreenHeight() ) )

   ACTIVATE DIALOG oDlg

return nil