FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse - Headers are not painted
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
xBrowse - Headers are not painted
Posted: Mon Jun 11, 2007 11:22 AM

Hi all,

in an empty xBrowse-object (that means, the data did not meet the scope condition and no data lines are shown) the header is not painted or it´s hidden.

Only if i leftclick on the header, i can see it.

What can i do to get all headers always visible ?

kind regards
Stefan

kind regards

Stefan
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
xBrowse - Headers are not painted
Posted: Tue Jun 12, 2007 08:44 AM

Nobody who noticed this behavior ?

kind regards

Stefan
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
xBrowse - Headers are not painted
Posted: Tue Jun 12, 2007 08:48 AM

Yes, I noticed it in little samples but it doesn't seem to be easely reproduceable.

EMG

Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
xBrowse - Headers are not painted
Posted: Tue Jun 12, 2007 09:08 AM

Enrico,

I can reproduce it all the time, every time the datalines are empty. I have searched in the class, but i did not find anything what stops the painting of the header.

I will try to build a little sample

Stefan

kind regards

Stefan
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
xBrowse - Headers are not painted
Posted: Tue Jun 12, 2007 09:09 AM
Stefan,

In Class TXBrowse Method Paint() comment out this line and please try it again:
   if ::nLen == 0
      // ::EraseData( nFirstRow  )
      return nil
   endif
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
xBrowse - Headers are not painted
Posted: Tue Jun 12, 2007 09:13 AM

Antonio, please note that I saw the problem in some situations also when records were present.

EMG

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
xBrowse - Headers are not painted
Posted: Tue Jun 12, 2007 09:15 AM

Enrico,

That may be another problem. In this case is when there are no records to show

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
xBrowse - Headers are not painted
Posted: Tue Jun 12, 2007 09:18 AM

Ok.

EMG

Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
xBrowse - Headers are not painted
Posted: Tue Jun 12, 2007 09:27 AM
Antonio,

if i only comment out ::EraseData (...), it´s not working, but if i comment out return nil, than it´s working as exspected, all headers are shown.

if ::nLen == 0
      // ::EraseData( nFirstRow  )
      // return nil
   endif


But i don´t know, if this has side effects in other situations.

many thanks

kind regards
Stefan
kind regards

Stefan
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
xBrowse - Headers are not painted
Posted: Tue Jun 12, 2007 09:33 AM
Stefan,

It looks ok. Lets change it this way:
   /* To paint headers when there are no records to show
   if ::nLen == 0
      ::EraseData( nFirstRow  )
      return nil
   endif
   */
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 30
Joined: Fri Oct 07, 2005 06:58 AM
xBrowse - Headers are not painted
Posted: Tue Jun 12, 2007 10:16 AM
I think it should be like this:
   if ::nLen == 0
      ::EraseData( nFirstRow  )
      ::DispEnd( aInfo )   // gs
      return nil
   endif

In this way it don't paint an empty row.

Let me know if it works

Regards
Gianni
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
xBrowse - Headers are not painted
Posted: Tue Jun 12, 2007 10:19 AM

Gianni,

Yes, you are right. many thanks! :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion