/*
Purpose: Showing three objects in a window that resize automatically
Author : James Bott
Date : 8/14/2010
*/
#include "fivewin.ch"
#include "color.ch"
// Set width and height here.
#define EXPLORERBAR_WIDTH 150
#define EXPLORERBAR_HEIGHT 400
Function Main()
local oWnd, oBar, oBrw, oExplBar, oScrollbar
use C:\FWH\samples\customer
define window oWnd title "Test"
define buttonbar oBar of oWnd
@ 0,50 Listbox oBrw fields of oWnd
oWnd:oTop:= oBar
oWnd:oLeft:= buildExbar( oWnd )
oWnd:oClient:= oBrw
activate window oWnd
return nil
Function BuildExbar( oWnd )
local oExBar, oPanel1, oPanel2, oPanel3, oPanel4, bClick
// test only
bClick:={|| msgInfo( "clicked") }
oExBar = TExplorerBar():New(0,0,EXPLORERBAR_WIDTH,EXPLORERBAR_HEIGHT,oWnd)
oPanel1 = oExBar:AddPanel( "One", "c:\fwh\bitmaps\32x32\people.bmp" )
oPanel1:lSpecial = .T.
oPanel1:AddLink( "First item", bClick, "c:\fwh\bitmaps\16x16\additem.bmp" )
oPanel1:AddLink( "Second item", bClick, "c:\fwh\bitmaps\16x16\copy.bmp" )
oPanel2 = oExBar:AddPanel( "Two", "c:\fwh\bitmaps\32x32\case.bmp" )
oPanel2:AddLink( "First item", bClick, "c:\fwh\bitmaps\16x16\adddbf.bmp" )
oPanel2:AddLink( "Second item", bClick, "c:\fwh\bitmaps\16x16\delete0.bmp" )
oPanel2:AddLink( "Third item", bClick, "c:\fwh\bitmaps\16x16\envelope.bmp" )
oPanel2:AddLink( "Fourth item", bClick, "c:\fwh\bitmaps\16x16\copy.bmp" )
oPanel3 = oExBar:AddPanel( "Three", "c:\fwh\bitmaps\32x32\graphics.bmp" )
oPanel3:AddLink( "First item", bClick, "c:\fwh\bitmaps\16x16\adddbf.bmp" )
oPanel3:AddLink( "Second item", bClick, "c:\fwh\bitmaps\16x16\delete0.bmp" )
oPanel3:AddLink( "Third item", bClick, "c:\fwh\bitmaps\16x16\envelope.bmp" )
oPanel4 = oExBar:AddPanel( "Four", "c:\fwh\bitmaps\32x32\graphics.bmp" )
oPanel4:AddLink( "First item", bClick, "c:\fwh\bitmaps\16x16\additem.bmp" )
oPanel4:AddLink( "Second item", bClick, "c:\fwh\bitmaps\16x16\copy.bmp" )
oPanel4:AddLink( "Third item", bClick, "c:\fwh\bitmaps\16x16\adddbf.bmp" )
oPanel4:AddLink( "Fourth item", bClick, "c:\fwh\bitmaps\16x16\delete0.bmp" )
oPanel4:AddLink( "Fifth item", bClick, "c:\fwh\bitmaps\16x16\envelope.bmp" )
return oExBar
//----------------------------------------------------------------------------//
if lAnd( GetWindowLong( ::oWnd:hWnd, GWL_STYLE ), WS_VSCROLL ) .and. lVisible
if ::oWnd:oVScroll == NIL .and. lVisible
DEFINE SCROLLBAR ::oWnd:oVScroll VERTICAL OF ::oWnd
::oVScroll = ::oWnd:oVScroll
It appears that you cannot put a scrollbar on a control (or a subclass of a control
Daniel Garcia-Gil wrote:Hello
i did so many change to enhanced/fix the vertical scroll bar. Now the scroll is over control, no over parent
will be in next build
sample
http://www.sitasoft.net/fivewin/samples/explbar.zip
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
function Main()
local oWnd, oExBar, oPanel1, oPanel2, oPanel3, oPanel4
local bClick := { | o | MsgInfo( o:GetText() ) }
local oBar
DEFINE WINDOW oWnd TITLE "FWH Class TExplorerBar"
DEFINE BUTTONBAR oBar OF oWnd 2007
oWnd:SetSize( 450, 300 )
oExBar = TExplorerBar():New( 0, 0, 400, 500, oWnd)
oPanel1 = oExBar:AddPanel( "One", "..\bitmaps\32x32\people.bmp" )
oPanel1:lSpecial = .T.
oPanel1:AddLink( "First item", bClick, "..\bitmaps\16x16\additem.bmp" )
oPanel1:AddLink( "Second item", bClick, "..\bitmaps\16x16\copy.bmp" )
oPanel2 = oExBar:AddPanel( "Two", "..\bitmaps\32x32\case.bmp" )
oPanel2:AddLink( "First item", bClick, "..\bitmaps\16x16\adddbf.bmp" )
oPanel2:AddLink( "Second item", bClick, "..\bitmaps\16x16\delete0.bmp" )
oPanel2:AddLink( "Third item", bClick, "..\bitmaps\16x16\envelope.bmp" )
oPanel2:AddLink( "Fourth item", bClick, "..\bitmaps\16x16\copy.bmp" )
oPanel3 = oExBar:AddPanel( "Three", "..\bitmaps\32x32\graphics.bmp" )
oPanel3:AddLink( "First item", bClick, "..\bitmaps\16x16\adddbf.bmp" )
oPanel3:AddLink( "Second item", bClick, "..\bitmaps\16x16\delete0.bmp" )
oPanel3:AddLink( "Third item", bClick, "..\bitmaps\16x16\envelope.bmp" )
oPanel4 = oExBar:AddPanel( "Four" )
oPanel4:AddLink( "First item", bClick, "..\bitmaps\16x16\additem.bmp" )
oPanel4:AddLink( "Second item", bClick, "..\bitmaps\16x16\copy.bmp" )
oWnd:oLeft = oExBar // oWnd:oRight = oExBar <== change to switch side
SET MESSAGE OF oWnd TO "FWH Class TExplorerBar demo" NOINSET CENTERED 2007
ACTIVATE WINDOW oWnd
return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 47 guests