Variable row height on a WBrowse - Otto

Variable row height on a WBrowse - Otto

Postby Antonio Linares » Mon Oct 15, 2007 6:05 am

Otto,

Here you have a simple working sample for making font zoom in/out on a wbrowse:
Code: Select all  Expand view
#include "FiveWin.ch"

static oBrw, oFont, nSize := -10

function Main()

   local oWnd

   USE customer

   DEFINE FONT oFont NAME "Verdana" SIZE 0, nSize

   DEFINE WINDOW oWnd TITLE "Browses - zoom" ;
      MENU BuildMenu()

   @ 0, 0 LISTBOX oBrw FIELDS FONT oFont

   oWnd:oClient = oBrw

   ACTIVATE WINDOW oWnd

return nil

function BuildMenu()

   local oMenu
   
   MENU oMenu
      MENUITEM "Zoom"
      MENU
         MENUITEM "Larger" ACTION Larger()
         MENUITEM "Smaller" ACTION Smaller()
      ENDMENU
   ENDMENU
   
return oMenu         

function Larger()

   nSize -= 2

   DEFINE FONT oFont NAME "Verdana" SIZE 0, nSize
   
   oBrw:SetFont( oFont )
   oBrw:Refresh()
   
return nil   

function Smaller()

   nSize += 2

   DEFINE FONT oFont NAME "Verdana" SIZE 0, nSize
   
   oBrw:SetFont( oFont )
   oBrw:Refresh()
   
return nil   
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Otto » Mon Oct 15, 2007 10:19 am

Thank you, Antonio.
User avatar
Otto
 
Posts: 6327
Joined: Fri Oct 07, 2005 7:07 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 56 guests