FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour XBrowse, how to turn on lines?
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
XBrowse, how to turn on lines?
Posted: Wed Apr 27, 2016 04: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
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: XBrowse, how to turn on lines?
Posted: Wed Apr 27, 2016 04: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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: XBrowse, how to turn on lines?
Posted: Wed Apr 27, 2016 04: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
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: XBrowse, how to turn on lines?
Posted: Wed Apr 27, 2016 05: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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: XBrowse, how to turn on lines?
Posted: Wed Apr 27, 2016 05:20 PM
Here is my test code. There are no lines.

Code (fw): Select all Collapse
#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
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: XBrowse, how to turn on lines?
Posted: Wed Apr 27, 2016 05:28 PM
Yes, Try

Code (fw): Select all Collapse
聽 聽//oBrw:lFullGrid:=.t. 聽// no effect
聽 聽oBrw:nColDividerStyle := LINESTYLE_BLACK
聽 聽oBrw:nRowDividerStyle := LINESTYLE_BLACK


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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: XBrowse, how to turn on lines?
Posted: Wed Apr 27, 2016 06:27 PM
Cristobal,

Code (fw): Select all Collapse
   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
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: XBrowse, how to turn on lines?
Posted: Wed Apr 27, 2016 06:36 PM
Ah, ok
I'll try with version 16.02

James, 16.02 is OK for me

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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: XBrowse, how to turn on lines?
Posted: Wed Apr 27, 2016 08:13 PM
Cristobal,

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



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
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: XBrowse, how to turn on lines?
Posted: Wed Apr 27, 2016 09:27 PM
James

Add this to your code :
Code (fw): Select all Collapse
oLbx:nMarqueeStyle := MARQSTYLE_HIGHLROW


Rick Lipkin
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: XBrowse, how to turn on lines?
Posted: 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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: XBrowse, how to turn on lines?
Posted: 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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: XBrowse, how to turn on lines?
Posted: 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 (fw): Select all Collapse
      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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: XBrowse, how to turn on lines?
Posted: 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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: XBrowse, how to turn on lines?
Posted: 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