xBrowser

xBrowser

Postby oliveiros junior » Wed Dec 20, 2023 1:16 pm

Guys, good morning!

I have two situations in xBrowser and I wanted to know if you have already experienced this and if you were able to resolve it:

a) when using a larger font, for example: "Arial" -20, xBrowser starts showing the line, columns with different colors;

b) when setting the size of the columns, it does not display the browser;

I clarify that the browser does not have a header, lines and vertical and horizontal scrolling, it looks like a form.

Below is the browser code
Code: Select all  Expand view  RUN

  DEFINE FONT oFontBrowser  NAME "Arial"    SIZE 0,  -20   BOLD

  @ nLinha, nColuna XBROWSE oBrowser SIZE nLargura, nAltura  ;
     OF oApp():oDialog                  ;
     COLUMNS 1, 2, 3, 4, 5, 6, 7        ; //, 8     ;
     FONT oFontBrowser                  ;
     NOBORDER PIXEL                     ;
     DATASOURCE oApp():aArray
 
  WITH OBJECT oBrowser
       :nMarqueeStyle        := MARQSTYLE_NOMARQUEE
       :nColDividerStyle     := LINESTYLE_NOLINES //LINESTYLE_BLACK  
       :nRowDividerStyle     := LINESTYLE_NOLINES  
       :nHeadDividerStyle    := LINESTYLE_NOLINES
       :lColDividerComplete  := .F.
       :lUpdate              := .T.
       :lHScroll             := .F.
       :lVScroll             := .F.
       :lHeader              := .F.
       :l2007                := .F.
       :lFlatStyle           := .T.
       :lRecordSelector      := .F.
       :lDrawBorder          := .F.
       :nStretchCol          := STRETCHCOL_WIDEST
       :nRowHeight           := 40
       :bLDblClick           := { || oBrowser:Refresh(), oBrowser:GoBottom(), oGet:Setfocus() }
       :bRClickData          := { || oBrowser:Refresh(), oBrowser:GoBottom(), oGet:Setfocus() }
       :bLClicked            := { |r,c,f,o| oBrowser:Refresh(), oBrowser:GoBottom(), oGet:Setfocus() }
       :bClrStd              := { || { CLR_BLACK, nRGB( 255, 255, 128 ) } }
       :bClrSel              := { || { CLR_BLACK, nRGB( 255, 255, 128 ) } }
       :bClrSelFocus         := { || { CLR_BLACK, nRGB( 255, 255, 128 ) } }
       
       WITH OBJECT :aCols[1]
            :nWidth          := oApp():aColunaBrowser[ 1 ]  
            :nDataStrAlign   := AL_LEFT
       END
         
       WITH OBJECT :aCols[2]
            :nWidth          := oApp():aColunaBrowser[ 2 ]
            :nDataStrAlign   := AL_RIGHT
       END
       
       WITH OBJECT :aCols[3]
            :nWidth          := oApp():aColunaBrowser[ 3 ]
            :nDataStrAlign   := AL_LEFT
       END
       
       WITH OBJECT :aCols[4]
            :nWidth          := oApp():aColunaBrowser[ 4 ]
            :nDataStrAlign   := AL_RIGHT
       END
       
       WITH OBJECT :aCols[5]
            :nWidth          := oApp():aColunaBrowser[ 5 ]
            :nDataStrAlign   := AL_LEFT
       END
       
       WITH OBJECT :aCols[6]
            :nWidth          := oApp():aColunaBrowser[ 6 ]
            :nDataStrAlign   := AL_RIGHT
       END
       
       WITH OBJECT :aCols[7]
            //:nWidth          := oApp():aColunaBrowser[ 7 ]
            :nDataStrAlign   := AL_RIGHT
       END
       
       :SetBackGround( ".\imagens\fundo.png", BCK_FILL )
       
       :CreateFromCode()
  END
 

Note that to show the columns, I had to inhibit the measurements of the last column.

Thank you very much in advance

Att.

Oliveiros Junior
oliveiros junior
 
Posts: 125
Joined: Tue Mar 20, 2007 3:13 pm

Re: xBrowser

Postby nageswaragunupudi » Wed Dec 20, 2023 3:56 pm

Please provide a sample that we can build and test at our end.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowser

Postby oliveiros junior » Wed Dec 20, 2023 9:22 pm

Mr Rao, Goodnight!

In the following example, although we have 7 columns, when placing the 7th element in the array the program does not execute. That's why there are 6 elements in the array.

I think the color change occurs when the content becomes larger than the space defined for the column.
Code: Select all  Expand view  RUN

/*------------------------------------------------------------------------------

Sample

-------------------------------------------------------------------------------*/


#include "fivewin.ch"
#include "Constant.ch"

*-------------------------------------------------------------------------------*
Function Main()
  Local oDialog, oBrowser, oFontBrowser, aArray, aColunaBrowser
 
  aColunaBrowser   := { 30, 100, 300, 60, 40, 80, 80 }
  aArray           := { { "01", "XXXXXXXX", "XX", "XX", "XX", "XX" }, { "02", "XX", "XX", "XX", "XX", "XX" } }
 
  DEFINE FONT oFontBrowser       NAME "Arial"    SIZE 0, -20  BOLD

  DEFINE DIALOG oDialog SIZE 1366, 768 ;
         STYLE nOr( WS_CHILD, WS_POPUP ) ;
         COLOR CLR_BLACK, CLR_BLACK TRUEPIXEL

  SetDlgGradient( { { 0.9, CLR_WHITE, CLR_WHITE }, ;
                    { 0.1, CLR_BLACK, CLR_BLACK }, .F. } )
 
  @ 317.200, 409.800 XBROWSE oBrowser SIZE 737.640, 383.200  ;
     OF oDialog                         ;
     COLUMNS 1, 2, 3, 4, 5, 6, 7        ;
     FONT oFontBrowser                  ;
     NOBORDER PIXEL                     ;
     DATASOURCE aArray

  WITH OBJECT oBrowser
       :nMarqueeStyle        := MARQSTYLE_NOMARQUEE
       :nColDividerStyle     := LINESTYLE_NOLINES //LINESTYLE_BLACK  
       :nRowDividerStyle     := LINESTYLE_NOLINES  
       :nHeadDividerStyle    := LINESTYLE_NOLINES
       :lColDividerComplete  := .F.
       :lUpdate              := .T.
       :lHScroll             := .F.
       :lVScroll             := .F.
       :lHeader              := .F.
       :l2007                := .F.
       :lFlatStyle           := .F.
       :lRecordSelector      := .F.
       :lDrawBorder          := .F.
       :nStretchCol          := STRETCHCOL_WIDEST
       :nRowHeight           := 40
       :bLDblClick           := { || oBrowser:Refresh(), oBrowser:GoBottom() }
       :bRClickData          := { || oBrowser:Refresh(), oBrowser:GoBottom() }
       :bLClicked            := { |r,c,f,o| oBrowser:Refresh(), oBrowser:GoBottom() }
       :bClrStd              := { || { CLR_BLACK, nRGB( 255, 255, 128 ) } }
       :bClrSel              := { || { CLR_BLACK, nRGB( 255, 255, 128 ) } }
       :bClrSelFocus         := { || { CLR_BLACK, nRGB( 255, 255, 128 ) } }
       
       WITH OBJECT :aCols[1]
            :nWidth          := aColunaBrowser[ 1 ]  
            :nDataStrAlign   := AL_LEFT
       END
         
       WITH OBJECT :aCols[2]
            :nWidth          := aColunaBrowser[ 2 ]
            :nDataStrAlign   := AL_RIGHT
       END
       
       WITH OBJECT :aCols[3]
            :nWidth          := aColunaBrowser[ 3 ]
            :nDataStrAlign   := AL_LEFT
       END
       
       WITH OBJECT :aCols[4]
            :nWidth          := aColunaBrowser[ 4 ]
            :nDataStrAlign   := AL_RIGHT
       END
       
       WITH OBJECT :aCols[5]
            :nWidth          := aColunaBrowser[ 5 ]
            :nDataStrAlign   := AL_LEFT
       END
       
       WITH OBJECT :aCols[6]
            :nWidth          := aColunaBrowser[ 6 ]
            :nDataStrAlign   := AL_RIGHT
       END
       
       WITH OBJECT :aCols[7]
            //:nWidth          := aColunaBrowser[ 7 ]
            :nDataStrAlign   := AL_RIGHT
       END
       
       :SetBackGround( "..\bitmaps\olga2.jpg", BCK_FILL )
       
       :CreateFromCode()
  END
 
  ACTIVATE DIALOG oDialog CENTERED

Return NIL
*-------------------------------------------------------------------------------*
 

Att.,

Oliveiros Junior
oliveiros junior
 
Posts: 125
Joined: Tue Mar 20, 2007 3:13 pm

Re: xBrowser

Postby acuellar » Wed Dec 20, 2023 11:53 pm

Estimado Oliveiros Junior

Utilice la pestaña Code para colocar su código

Code: Select all  Expand view  RUN
Aquí coloque su código
Saludos,

Adhemar C.
User avatar
acuellar
 
Posts: 1644
Joined: Tue Oct 28, 2008 6:26 pm
Location: Santa Cruz-Bolivia

Re: xBrowser

Postby nageswaragunupudi » Thu Dec 21, 2023 3:25 pm

First step:
Please try this and see.
It is working for me here.
Please confirm if it is working for you also there.
Code: Select all  Expand view  RUN
#include "fivewin.ch"

function Main()

   local oDlg, oBrw, oFont, aArray
   local aWidths := { 30, 100, 300, 60, 40, 80, 80 }

   aArray := { { "01", "XXXXXXXX", "XX", "XX", "XX", "XX", "77" }, ;
               { "02", "XX",       "XX", "XX", "XX", "XX", "77" } }

   DEFINE FONT oFont NAME "ARIAL" SIZE 0,-20 BOLD
   DEFINE DIALOG oDlg SIZE 1366,768 PIXEL TRUEPIXEL FONT oFont
   @ 317,410 XBROWSE oBrw SIZE 734,383 PIXEL OF oDlg ;
      DATASOURCE aArray AUTOCOLS ;
      COLSIZES aWidths ;
      JUSTIFY AL_LEFT, AL_RIGHT, AL_LEFT, AL_RIGHT, AL_LEFT, AL_RIGHT, AL_RIGHT ;
      NOBORDER

   WITH OBJECT oBrw
      :lHScroll := .F.
      :lVScroll := .F.
      :lHeader := .F.
      :lRecordSelector := .F.
      :nStretchCol := STRETCHCOL_WIDEST
      :SetBackGround( "..\bitmaps\olga1.jpg", BCK_FILL )

      :CreateFromCode()
   END

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont

return nil
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowser

Postby oliveiros junior » Thu Dec 21, 2023 5:00 pm

Olá Adhemar,

Obrigado pela orientação. Vou segui-la na próxima postagem.

Att.,

Oliveiros Junior
oliveiros junior
 
Posts: 125
Joined: Tue Mar 20, 2007 3:13 pm

Re: xBrowser

Postby oliveiros junior » Thu Dec 21, 2023 5:03 pm

Mr Rao,

Yes it works. Showed the 7 columns.

Att.,

Oliveiros Junior
oliveiros junior
 
Posts: 125
Joined: Tue Mar 20, 2007 3:13 pm

Re: xBrowser

Postby nageswaragunupudi » Thu Dec 21, 2023 5:38 pm

Now, whatever extra features you want, keep adding one line at a time and test.
You will know which line is giving you the problem.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowser

Postby oliveiros junior » Thu Dec 21, 2023 5:50 pm

thanks mister Rao
oliveiros junior
 
Posts: 125
Joined: Tue Mar 20, 2007 3:13 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 72 guests