Page 1 of 1

xBrowse - Headers are not painted

Posted: Mon Jun 11, 2007 11:22 am
by StefanHaupt
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

Posted: Tue Jun 12, 2007 8:44 am
by StefanHaupt
Nobody who noticed this behavior ?

Posted: Tue Jun 12, 2007 8:48 am
by Enrico Maria Giordano
Yes, I noticed it in little samples but it doesn't seem to be easely reproduceable.

EMG

Posted: Tue Jun 12, 2007 9:08 am
by StefanHaupt
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

Posted: Tue Jun 12, 2007 9:09 am
by Antonio Linares
Stefan,

In Class TXBrowse Method Paint() comment out this line and please try it again:

Code: Select all

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

Posted: Tue Jun 12, 2007 9:13 am
by Enrico Maria Giordano
Antonio, please note that I saw the problem in some situations also when records were present.

EMG

Posted: Tue Jun 12, 2007 9:15 am
by Antonio Linares
Enrico,

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

Posted: Tue Jun 12, 2007 9:18 am
by Enrico Maria Giordano
Ok.

EMG

Posted: Tue Jun 12, 2007 9:27 am
by StefanHaupt
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

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

Posted: Tue Jun 12, 2007 9:33 am
by Antonio Linares
Stefan,

It looks ok. Lets change it this way:

Code: Select all

   /* To paint headers when there are no records to show
   if ::nLen == 0
      ::EraseData( nFirstRow  )
      return nil
   endif
   */

Posted: Tue Jun 12, 2007 10:16 am
by Gianni
I think it should be like this:

Code: Select all

   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

Posted: Tue Jun 12, 2007 10:19 am
by Antonio Linares
Gianni,

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