xBrowse - Headers are not painted

xBrowse - Headers are not painted

Postby StefanHaupt » 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
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Postby StefanHaupt » Tue Jun 12, 2007 8:44 am

Nobody who noticed this behavior ?
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Postby Enrico Maria Giordano » Tue Jun 12, 2007 8:48 am

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby StefanHaupt » Tue Jun 12, 2007 9: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
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Postby Antonio Linares » Tue Jun 12, 2007 9:09 am

Stefan,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Enrico Maria Giordano » Tue Jun 12, 2007 9:13 am

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Antonio Linares » Tue Jun 12, 2007 9: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Postby StefanHaupt » Tue Jun 12, 2007 9: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.

Code: Select all  Expand view
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
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Postby Antonio Linares » Tue Jun 12, 2007 9:33 am

Stefan,

It looks ok. Lets change it this way:
Code: Select all  Expand view
   /* 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Gianni » Tue Jun 12, 2007 10:16 am

I think it should be like this:
Code: Select all  Expand view
   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
Gianni
 
Posts: 30
Joined: Fri Oct 07, 2005 6:58 am

Postby Antonio Linares » Tue Jun 12, 2007 10:19 am

Gianni,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 45 guests