I have another error
look the image
why It create a black background ?
Dear Antonio : ERROR graphics on xbrowse header
Dear Antonio : ERROR graphics on xbrowse header
Last edited by Silvio on Wed Mar 05, 2008 12:57 pm, edited 1 time in total.
Best Regards, Saludos
Falconi Silvio
Falconi Silvio
there is another bug :
I made
oApp():oGrid:bClrHeader := { || { DARKORANGE2 , DARKBLUE} }
where
#define DARKORANGE2 nRGB( 247, 192, 91 )
#define DARKBLUE nRGB( 3, 56, 147 )
all is ok
but when I use a bitmap on xbrowse header it change the background color of this bitmap
see it please
whit the command oApp():oGrid:bClrHeader := { || { DARKORANGE2 , DARKBLUE} }
I made
oApp():oGrid:bClrHeader := { || { DARKORANGE2 , DARKBLUE} }
where
#define DARKORANGE2 nRGB( 247, 192, 91 )
#define DARKBLUE nRGB( 3, 56, 147 )
all is ok
but when I use a bitmap on xbrowse header it change the background color of this bitmap
see it please
whit the command oApp():oGrid:bClrHeader := { || { DARKORANGE2 , DARKBLUE} }
Best Regards, Saludos
Falconi Silvio
Falconi Silvio
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
ok first sample :
there are not column there !!!
and Now you can see also black the selector
Code: Select all
#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
there are not column there !!!
and Now you can see also black the selector
Best Regards, Saludos
Falconi Silvio
Falconi Silvio
SECOND STEP
TEST.RC
Code: Select all
#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
TEST.RC
Code: Select all
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'
}
Best Regards, Saludos
Falconi Silvio
Falconi Silvio
third and last step
see Newdialog func
do you see a marron line ?
Code: Select all
#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
do you see a marron line ?
Best Regards, Saludos
Falconi Silvio
Falconi Silvio