xBrowse - Headers are not painted

Post Reply
StefanHaupt
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

xBrowse - Headers are not painted

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

Post by StefanHaupt »

Nobody who noticed this behavior ?
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post by Enrico Maria Giordano »

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

EMG
StefanHaupt
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post by Enrico Maria Giordano »

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

EMG
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Enrico,

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

Antonio Linares
www.fivetechsoft.com
StefanHaupt
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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
   */
regards, saludos

Antonio Linares
www.fivetechsoft.com
Gianni
Posts: 30
Joined: Fri Oct 07, 2005 6:58 am

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Gianni,

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

Antonio Linares
www.fivetechsoft.com
Post Reply