Dear Antonio : ERROR graphics on xbrowse header

Post Reply
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Dear Antonio : ERROR graphics on xbrowse header

Post by Silvio »

I have another error
look the image


Image

why It create a black background ?
Last edited by Silvio on Wed Mar 05, 2008 12:57 pm, edited 1 time in total.
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Post by Silvio »

found !!!!!!!!!

I made this command
oApp():oGrid:nRecSelColor := {|| { CLR_WHITE, RGB(24, 116, 205) } }
it make now also the recsel ( on the left) with black background

Dear Antonio,

is there a bug sure !
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Post by 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





Image


whit the command oApp():oGrid:bClrHeader := { || { DARKORANGE2 , DARKBLUE} }



Image
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Post by Silvio »

Another :

How I can make to erase the marron line at the init of header ?

please see the picture sample :
Image
Best Regards, Saludos

Falconi Silvio
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Silvio,

Lets go one by one :-)

In the first one, is there a column there ? or is it the right empty space ?

Are you able to reproduce it on a small sample ? Thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Post by Silvio »

ok first sample :

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
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Post by Silvio »

SECOND STEP

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
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Post by Silvio »

third and last step

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

















see Newdialog func
do you see a marron line ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Post by Silvio »

Dear Antonio,
you try my samples ?
Best Regards, Saludos

Falconi Silvio
Post Reply