#include 'fivewin.ch'
#include 'ord.ch'
#include 'xbrowse.ch'
#include 'hbcompat.ch'
REQUEST DBFCDX
#define nHeightBar 35
#define nHeightBtn 35
#define nWidthBtn 33
static ltoolBar:=.t.
static oBar
Function test()
Local oDlg, oBrw
RDDSETDEFAULT( "DBFCDX" )
USE CUSTOMER ALIAS CUST
Define DIALOG oDlg TITLE "Searching Customers - " ;
FROM 452, 774 to 870, 1303 PIXEL COLOR 0, 14215660
@ 80,10 XBROWSE oBrw SIZE -10,-10 PIXEL OF oDlg ;
AUTOCOLS ALIAS "CUST" CELL LINES NOBORDER
oBrw:bRCLicked := {|nRow,nCol| MenuOption(oDlg,nRow,nCol,"BA",oBrw) }
oBrw:CreateFromCode()
ACTIVATE DIALOG oDlg CENTERED;
ON INIT ChangeSize(oBrw,ltoolBar,oDlg)
RETURN NIL
//------------------------------------------------------------------------------------//
Function ChangeSize(oGrid,ltoolBar,oDlg)
nOldTop:= oGrid:ntop
nOldBottom:=oGrid:nBottom
If ltoolBar
CreateToolBar( oGrid,oDlg,ltoolBar)
oGrid:nTop:= nOldTop +nHeightBar
oGrid:nHeight:=oGrid:nBottom+nHeightBar
Else
If oBar!=NIL
oBar:End()
Endif
oGrid:nTop:=nOldTop -nHeightBar
oGrid:nHeight:=oGrid:nBottom -nHeightBar
Endif
oGrid:refresh()
Retur nil
//------------------------------------------------------------------------------------//
Function CreateToolBar( oGrid,oDlg,ltoolBar)
lOCAL oBrush1,oBtns
DEFINE BRUSH oBrush1 COLOR RGB(143,172,230)
If ltoolBar
oBar:= TPanel():New(oGrid:nTop-5,oGrid:nLeft,(oGrid:nTop-5)+nHeightBar,oGrid:nwidth,oDlg)
* oBar:Setbrush(oBrush1)
oBtns:= TBar():New(oBar)
oBtns:ntop := 1
oBtns:nLeft:= 1
oBtns:nwidth :=oBar:nwidth-1
oBtns:nbottom:= oBar:nbottom
oBtns:l2010 :=.t.
oBtns:l3D :=.t.
DEFINE BUTTON OF oBtns ;
RESOURCE "LOOK_TOP" ;
TOOLTIP i18n( "Primo record" ) ;
MESSAGE i18n( "Primo record dell'elenco.." ) ;
ACTION oGrid:KeyDown(VK_HOME, 0)
//buttons
DEFINE BUTTON OF oBtns ;
RESOURCE "LOOK_TOP" ;
TOOLTIP i18n( "Primo record" ) ;
MESSAGE i18n( "Primo record dell'elenco.." ) ;
ACTION oGrid:KeyDown(VK_HOME, 0)
DEFINE BUTTON OF oBtns ;
RESOURCE "LOOK_PREV" ;
TOOLTIP i18n( "Record Precedente" ) ;
MESSAGE i18n( "Retrocede di un record dell'elenco" ) ;
ACTION oGrid:KeyDown(VK_UP, 0)
DEFINE BUTTON OF oBtns ;
RESOURCE "LOOK_NEXT" ;
TOOLTIP i18n( "Record successivo" ) ;
MESSAGE i18n( "Avanza di un record nell'elenco" ) ;
ACTION oGrid:KeyDown(VK_DOWN, 0)
DEFINE BUTTON OF oBtns ;
RESOURCE "LOOK_BOTTOM" ;
TOOLTIP i18n( "Ultimo record" ) ;
MESSAGE i18n( "Ultimo Record dell'elenco" ) ;
ACTION oGrid:KeyDown(VK_END, 0)
ELSE
If oBar!=NIL
oBar:End()
Endif
ENDIF
oDlg:refresh()
return nil
//------------------------------------------------------------------------------------//
Function MenuOption(oDlg,nRow,nCol,cDbf,oGrid)
LOCAL oMenu
MENU oMenu POPUP 2007
SEPARATOR
MENUITEM "Show ToolBar";
WHEN { |o| o:SetCheck( ltoolBar ), .t. } ;
ACTION ( ltoolBar :=!ltoolBar,;
ChangeSize(oGrid,ltoolBar,oBar),oGrid:refresh(),;
oMenuItem:SetCheck( ltoolBar ))
SEPARATOR
ENDMENU
ACTIVATE POPUP oMenu OF oDlg AT oGrid:nTop+nRow, oGrid:nLeft+nCol
RETURN (NIL
Application
===========
Path and name: C:\work\errori\barcust\test.Exe (32 bits)
Size: 2,212,352 bytes
Compiler version: xHarbour build 1.2.1 Intl. (SimpLex) (Rev. 6715)
FiveWin Version: FWHX 13.01
Windows version: 5.1, Build 2600 Service Pack 2
Time from start: 0 hours 0 mins 4 secs
Error occurred at: 05/16/13, 11:55:26
Error description: Warning BASE/1004 Message not found: TPANEL:DEFCONTROL
Stack Calls
===========
Called from: source\rtl\tobject.prg => TPANEL:ERROR( 172 )
Called from: source\rtl\tobject.prg => TPANEL:MSGNOTFOUND( 205 )
Called from: source\rtl\tobject.prg => TPANEL:DEFCONTROL( 0 )
Called from: .\source\classes\TPANEL.PRG => TPANEL:NEW( 55 )
Called from: test.prg => CREATETOOLBAR( 85 )
Called from: test.prg => CHANGESIZE( 60 )
Called from: test.prg => (b)MENUOPTION( 179 )
Called from: .\source\classes\MENU.PRG => TMENU:ACTIVATE( 494 )
Called from: test.prg => MENUOPTION( 185 )
Called from: test.prg => (b)TEST( 37 )
Called from: .\source\classes\WINDOW.PRG => TCONTROL:RBUTTONDOWN( 1970 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:RBUTTONDOWN( 3707 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1724 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 11739 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3177 )
Called from: => DIALOGBOXINDIRECT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 270 )
Called from: test.prg => TEST( 46 )
Silvio.Falconi wrote:But I not Know How erase black border
Silvio.Falconi wrote:But I not Know How erase black border
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot], nageswaragunupudi and 115 guests