XBrowse, how to turn on lines?

XBrowse, how to turn on lines?

Postby James Bott » Wed Apr 27, 2016 4:39 pm

It has been awhile since I worked with XBrowse. I seem to remember that lines were on by default at one time, now they are off.

I note that there is a LINES parameter in the XBROWSE definition so you can do this to turn on lines:

@ 0,0 xbrowse oBrw of oWnd LINES

However, all my old code is using OOP class syntax like this:

oBrw:= TXBrowse():new(oWnd)

Since the XBrowse class deviates somewhat from a normal class, the LINES parameter is processed by the XbrowseNew() function rather than the xBrowse:new() method, so I cannot figure out how to just turn on lines. I note that there is a way to turn off lines:

oBrw:nColDividerStyle := LINESTYLE_NOLINES
oBrw:nRowDividerStyle := LINESTYLE_NOLINES

According to my old notes, you used to just define a color to turn on the lines, but this is not working now:

oBrw:nColDividerStyle:= LINESTYLE_BLACK

Also, I do not see a setLines() method. And the xbrowse:new() method only accepts the oWnd parameter. And I don't see a class DATA lLines.

So, is there a way to turn on lines without using the DEFINE XBROWSE...LINES parameter?

Regards,
James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: XBrowse, how to turn on lines?

Postby cnavarro » Wed Apr 27, 2016 4:42 pm

James, you try ::lFullGrid := .T.
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: XBrowse, how to turn on lines?

Postby James Bott » Wed Apr 27, 2016 4:45 pm

Cristobal,

Wow, that was a quick reply.

I just tried it and there are still no lines.

Thanks,
James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: XBrowse, how to turn on lines?

Postby cnavarro » Wed Apr 27, 2016 5:02 pm

James is rare

lFullGrid,; // Draw full horiz and vert lines even if not all rows have data


Your are other sets in others DATAs?
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: XBrowse, how to turn on lines?

Postby James Bott » Wed Apr 27, 2016 5:20 pm

Here is my test code. There are no lines.

Code: Select all  Expand view
#include "fivewin.ch"
#include "xbrowse.ch"


function Main()

   local oWnd, oBrw, oDbf

   use customer
   database odbf

   define window ownd
   
   @ 0,0 xbrowse oBrw of oWnd ;
         object odbf
         
   //oBrw:lColDividerComplete := .T.   // no effect
   
   oBrw:lFullGrid:=.t.  // no effect    
   
   oBrw:CreateFromCode()
   oBrw:nRowDividerStyle := LINESTYLE_BLACK

   oWnd:oClient := oBrw

   activate window oWnd

return nil
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: XBrowse, how to turn on lines?

Postby cnavarro » Wed Apr 27, 2016 5:28 pm

Yes, Try

Code: Select all  Expand view


   //oBrw:lFullGrid:=.t.  // no effect
   oBrw:nColDividerStyle := LINESTYLE_BLACK
   oBrw:nRowDividerStyle := LINESTYLE_BLACK

 


Image
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: XBrowse, how to turn on lines?

Postby James Bott » Wed Apr 27, 2016 6:27 pm

Cristobal,

Code: Select all  Expand view
  oBrw:nColDividerStyle := LINESTYLE_BLACK
   oBrw:nRowDividerStyle := LINESTYLE_BLACK


I had already tried that, and it used to work, but doesn't now. I even just tried it again and it is not working for me.

I am using FWH 16.02 and I note that you are using 16.03 so it seems that must have been fixed in 16.03. I guess I need to upgrade again--upgrading always gets put on the bottom of the TO DO list.

Thanks for the help.

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: XBrowse, how to turn on lines?

Postby cnavarro » Wed Apr 27, 2016 6:36 pm

Ah, ok
I'll try with version 16.02

James, 16.02 is OK for me

Image
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: XBrowse, how to turn on lines?

Postby James Bott » Wed Apr 27, 2016 8:13 pm

Cristobal,

Well, I'm baffled. Here is my screenshot:

Image

It looks (from your screenshot) that you are using Harbour--I am using xHarbour. I wonder if that could be the difference?

I do note that if I use the LINES clause in the xbrowse definition that the lines do show.

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: XBrowse, how to turn on lines?

Postby Rick Lipkin » Wed Apr 27, 2016 9:27 pm

James

Add this to your code :
Code: Select all  Expand view

oLbx:nMarqueeStyle := MARQSTYLE_HIGHLROW
 


Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: XBrowse, how to turn on lines?

Postby James Bott » Wed Apr 27, 2016 10:04 pm

Rick,

oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROW

Thanks but I had already tried that, and I just did it again. Still no lines.

Actually, there are lines on the highlight bar, but they only show as white vertical bars on the highlight bar itself.

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: XBrowse, how to turn on lines?

Postby James Bott » Wed Apr 27, 2016 11:00 pm

I tried the "if nothing else works, try rebooting" technique and that didn't show any lines either. Curiously, the highlight bar is now a different color than it was before I rebooted. Strange...

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: XBrowse, how to turn on lines?

Postby James Bott » Wed Apr 27, 2016 11:16 pm

I have just found that when you can get lines to show they are always black. These color settings don't work anymore.

Code: Select all  Expand view
     oBrw:nColDividerStyle := LINESTYLE_LIGHTGRAY
      oBrw:nRowDividerStyle := LINESTYLE_LIGHTGRAY


So, you can only have black lines or no lines. I am assuming the other manifest color constants don't work either, although I didn't try them.

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: XBrowse, how to turn on lines?

Postby nageswaragunupudi » Wed Apr 27, 2016 11:28 pm

Mr James

Let me first assure you this. There has been no change in the behavior regarding lines in any version from the time I started using xbrowse till today. So versions should not matter. Same way, xharbour or harbour and bcc or msvc and 32 bit/ 64 bit also does not matter.

The behavior is just the same today in all versions as it was when xbrowse was created.
Regards

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

Re: XBrowse, how to turn on lines?

Postby James Bott » Thu Apr 28, 2016 12:00 am

Rao,

Thanks, that's good to hear.

Have you tried my example code? If so, what is your result?

I am at a loss as to how to explain what I am seeing. The test code is very simple, and yet I do not get any lines and others do.

Any ideas?

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 67 guests