I have another error
look the image
why It create a black background ?
#include "FiveWin.ch"
#include "xbrowse.ch"
#define LIGHTBLUE nRGB( 89, 135, 214 )
#define DARKBLUE nRGB( 3, 56, 147 )
#define LIGHTORANGE1 nRGB( 250, 227, 143 )
#define DARKORANGE1 nRGB( 238, 152, 25 )
#define LIGHTCYAN nRGB( 203, 225, 252 )
#define DARKCYAN nRGB( 125, 165, 224 )
#define LIGHTORANGE2 nRGB( 255, 255, 220 )
#define DARKORANGE2 nRGB( 247, 192, 91 )
function Main()
local oWnd
USE CUSTOMER NEW
INDEX ON field->first to "name"
SET INDEX TO "name"
ORDSETFOCUS( "name" )
GO TOP
DEFINE WINDOW oWnd TITLE "New TXBrowse class (only for FWH)" ;
MENU BuildMenu( oWnd ) MDI ;
MENUINFO 3
DEFINE BITMAP oBmp RESOURCE "Background"
SET MESSAGE OF oWnd TO FWVERSION + ", " + FWCOPYRIGHT CENTERED TIME DATE
ACTIVATE WINDOW oWnd
return nil
function BuildMenu( oWnd )
local oMenu
local cFile
cFile := cFilePath( GetModuleFileName( GetInstance() ) ) + "readme.txt"
MENU oMenu
MENUITEM "sample xbrowse"
MENU
MENUITEM "sample browse" ;
ACTION mybrowse( oWnd )
ENDMENU
ENDMENU
return oMenu
STATIC FUNCTION mybrowse( oWnd )
local oChild, oBrw
DEFINE WINDOW oChild TITLE "MultiSelect browse" MDICHILD OF oWnd
oBrw := TXBrowse():New( oWnd )
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROWMS
oBrw:nColDividerStyle := LINESTYLE_FORECOLOR
oBrw:lColDividerComplete := .t.
oBrw:lRecordSelector := .T.
oBrw:nRecSelColor := {|| { LIGHTCYAN , LIGHTBLUE } }
oBrw:SetRDD()
oBrw:CreateFromCode()
oChild:oClient := oBrw
ACTIVATE WINDOW oChild ON INIT oBrw:SetFocus()
RETURN NIL
#include "FiveWin.ch"
#include "xbrowse.ch"
#define LIGHTBLUE nRGB( 89, 135, 214 )
#define DARKBLUE nRGB( 3, 56, 147 )
#define LIGHTORANGE1 nRGB( 250, 227, 143 )
#define DARKORANGE1 nRGB( 238, 152, 25 )
#define LIGHTCYAN nRGB( 203, 225, 252 )
#define DARKCYAN nRGB( 125, 165, 224 )
#define LIGHTORANGE2 nRGB( 255, 255, 220 )
#define DARKORANGE2 nRGB( 247, 192, 91 )
function Main()
local oWnd
USE CUSTOMER NEW
INDEX ON field->first to "name"
SET INDEX TO "name"
ORDSETFOCUS( "name" )
GO TOP
DEFINE WINDOW oWnd TITLE "New TXBrowse class (only for FWH)" ;
MENU BuildMenu( oWnd ) MDI ;
MENUINFO 3
DEFINE BITMAP oBmp RESOURCE "Background"
SET MESSAGE OF oWnd TO FWVERSION + ", " + FWCOPYRIGHT CENTERED TIME DATE
ACTIVATE WINDOW oWnd
return nil
function BuildMenu( oWnd )
local oMenu
local cFile
cFile := cFilePath( GetModuleFileName( GetInstance() ) ) + "readme.txt"
MENU oMenu
MENUITEM "sample xbrowse"
MENU
MENUITEM "sample browse" ;
ACTION mybrowse( oWnd )
ENDMENU
ENDMENU
return oMenu
STATIC FUNCTION mybrowse( oWnd )
local oChild, oBrw
DEFINE WINDOW oChild TITLE "MultiSelect browse" MDICHILD OF oWnd
oBrw := TXBrowse():New( oWnd )
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROWMS
oBrw:nColDividerStyle := LINESTYLE_FORECOLOR
oBrw:lColDividerComplete := .t.
oBrw:lRecordSelector := .T.
oBrw:nRowHeight :=40
oCol:=oBrw:AddCol()
oCol:AddResource("sort1")
oCol:AddResource("sort2")
oCol:nHeadBmpNo := 1
oCol:nHeadBmpAlign := AL_RIGHT
oCol:bStrData := { || field->first }
oCol:cHeader := i18n('first')
oCol:nWidth :=80
oCol:= oBrw:AddCol()
oCol:AddResource("sort1")
oCol:AddResource("sort2")
oCol:nHeadBmpNo := 1
oCol:nHeadBmpAlign := AL_RIGHT
oCol:bStrData := { || field->last }
oCol:cHeader := i18n('first')
oCol:nWidth :=80
oBrw:nRecSelColor := {|| { LIGHTCYAN , LIGHTBLUE } }
oBrw:bClrHeader := { || { DARKORANGE2 , DARKBLUE} }
oBrw:SetRDD()
oBrw:CreateFromCode()
oChild:oClient := oBrw
ACTIVATE WINDOW oChild ON INIT oBrw:SetFocus()
RETURN NIL
SORT1 BITMAP LOADONCALL MOVEABLE DISCARDABLE
{
'42 4D 36 03 00 00 00 00 00 00 36 00 00 00 28 00'
'00 00 10 00 00 00 10 00 00 00 01 00 18 00 00 00'
'00 00 00 03 00 00 C2 1E 00 00 C2 1E 00 00 00 00'
'00 00 00 00 00 00 FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF FF 00 FF FF 00 FF 00 00 00 00 00'
'00 FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF FF 00 FF 00 00 00 9C FF FF 31 FF'
'FF 00 00 00 FF 00 FF FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF 00 00 00 9C FF FF 31 FF FF 00 D6'
'FF 31 FF FF 00 00 00 FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF 00 00 00 9C FF FF 31 FF FF 9C FF FF 00 D6'
'FF 00 D6 FF 31 FF FF 00 00 00 FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF 42'
'42 42 9C FF FF 9C FF FF 9C FF FF 31 FF FF 00 D6'
'FF 00 D6 FF 00 D6 FF 31 FF FF 00 00 00 FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF 42'
'42 42 42 42 42 42 42 42 9C FF FF 9C FF FF 00 D6'
'FF 00 D6 FF 00 00 00 00 00 00 00 00 00 FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF 42 42 42 9C FF FF 31 FF FF 00 D6'
'FF 00 D6 FF 00 00 00 FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF 42 42 42 9C FF FF 9C FF FF 00 D6'
'FF 00 D6 FF 00 00 00 FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF 42 42 39 9C FF FF 29 FF FF 00 D6'
'FF 00 D6 FF 00 00 00 FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF 42 42 42 9C FF FF 9C FF FF 00 D6'
'FF 00 D6 FF 00 00 00 FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF 42 42 42 9C FF FF 9C FF FF 31 FF'
'FF 31 FF FF 00 00 00 FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF 42 42 42 42 42 42 42 42 42 42 42'
'42 42 42 42 42 42 42 FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF'
}
SORT2 BITMAP LOADONCALL MOVEABLE DISCARDABLE
{
'42 4D 36 03 00 00 00 00 00 00 36 00 00 00 28 00'
'00 00 10 00 00 00 10 00 00 00 01 00 18 00 00 00'
'00 00 00 03 00 00 C2 1E 00 00 C2 1E 00 00 00 00'
'00 00 00 00 00 00 FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF FF 00 FF FF 00 FF 40 40 40 40 40'
'40 FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF FF 00 FF 40 40 40 FF 00 FF FF 00'
'FF 40 40 40 FF 00 FF FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF 40 40 40 FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF 40 40 40 FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF 40 40 40 FF 00 FF FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF FF 00 FF 40 40 40 FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF 80'
'80 80 FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF FF 00 FF FF 00 FF 40 40 40 FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF 80'
'80 80 80 80 80 80 80 80 FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF 40 40 40 40 40 40 40 40 40 FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF 80 80 80 FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF 40 40 40 FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF 80 80 80 FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF 40 40 40 FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF 80 80 80 FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF 40 40 40 FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF 80 80 80 FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF 40 40 40 FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF 80 80 80 FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF 40 40 40 FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF 80 80 80 80 80 80 80 80 80 80 80'
'80 80 80 80 80 80 80 FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF'
}
#include "FiveWin.ch"
#include "xbrowse.ch"
#define LIGHTBLUE nRGB( 89, 135, 214 )
#define DARKBLUE nRGB( 3, 56, 147 )
#define LIGHTORANGE1 nRGB( 250, 227, 143 )
#define DARKORANGE1 nRGB( 238, 152, 25 )
#define LIGHTCYAN nRGB( 203, 225, 252 )
#define DARKCYAN nRGB( 125, 165, 224 )
#define LIGHTORANGE2 nRGB( 255, 255, 220 )
#define DARKORANGE2 nRGB( 247, 192, 91 )
function Main()
local oWnd
USE CUSTOMER NEW
INDEX ON field->first to "name"
SET INDEX TO "name"
ORDSETFOCUS( "name" )
GO TOP
DEFINE WINDOW oWnd TITLE "New TXBrowse class (only for FWH)" ;
MENU BuildMenu( oWnd ) MDI ;
MENUINFO 3
DEFINE BITMAP oBmp RESOURCE "Background"
SET MESSAGE OF oWnd TO FWVERSION + ", " + FWCOPYRIGHT CENTERED TIME DATE
ACTIVATE WINDOW oWnd
return nil
function BuildMenu( oWnd )
local oMenu
local cFile
cFile := cFilePath( GetModuleFileName( GetInstance() ) ) + "readme.txt"
MENU oMenu
MENUITEM "sample xbrowse"
MENU
MENUITEM "sample browse" ;
ACTION mybrowse( oWnd )
MENUITEM "sample DIALOG" ;
ACTION NewDialog( oWnd )
ENDMENU
ENDMENU
return oMenu
STATIC FUNCTION mybrowse( oWnd )
local oChild, oBrw
DEFINE WINDOW oChild TITLE "MultiSelect browse" MDICHILD OF oWnd
oBrw := TXBrowse():New( oWnd )
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROWMS
oBrw:nColDividerStyle := LINESTYLE_FORECOLOR
oBrw:lColDividerComplete := .t.
oBrw:lRecordSelector := .T.
oBrw:nRowHeight :=40
oCol:=oBrw:AddCol()
oCol:AddResource("sort1")
oCol:AddResource("sort2")
oCol:nHeadBmpNo := 1
oCol:nHeadBmpAlign := AL_RIGHT
oCol:bStrData := { || field->first }
oCol:cHeader := i18n('first')
oCol:nWidth :=80
oCol:= oBrw:AddCol()
oCol:AddResource("sort1")
oCol:AddResource("sort2")
oCol:nHeadBmpNo := 1
oCol:nHeadBmpAlign := AL_RIGHT
oCol:bStrData := { || field->last }
oCol:cHeader := i18n('last')
oCol:nWidth :=80
oBrw:nRecSelColor := {|| { LIGHTCYAN , LIGHTBLUE } }
oBrw:bClrHeader := { || { DARKORANGE2 , DARKBLUE} }
oBrw:SetRDD()
oBrw:CreateFromCode()
oChild:oClient := oBrw
ACTIVATE WINDOW oChild ON INIT oBrw:SetFocus()
RETURN NIL
STATIC FUNCTION NewDialog( oWnd )
local oDlg, oBrw, nSplit:=10
DEFINE DIALOG oDlg FROM 10,24 TO 30,80 OF oWnd
oDlg:SetColor(0,RGB(143,172,230))
oBrw := TXBrowse():New(oDlg )
oBrw:nTop := 10
oBrw:nLeft := nSplit+2
oBrw:nBottom := oDlg:nBOTTOM
oBrw:nRight := oDlg:nRight
oCol:=oBrw:AddCol()
oCol:AddResource("sort1")
oCol:AddResource("sort2")
oCol:nHeadBmpNo := 1
oCol:nHeadBmpAlign := AL_RIGHT
oCol:bStrData := { || field->first }
oCol:cHeader := i18n('first')
oCol:nWidth :=80
oCol:= oBrw:AddCol()
oCol:AddResource("sort1")
oCol:AddResource("sort2")
oCol:nHeadBmpNo := 1
oCol:nHeadBmpAlign := AL_RIGHT
oCol:bStrData := { || field->last }
oCol:cHeader := i18n('last')
oCol:nWidth :=80
oBrw:SetRDD()
oBrw:CreateFromCode()
ACTIVATE DIALOG oDlg ;
RETURN NIL
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 85 guests