ASSISTANCE NEEDED - Dual xbrowse header

ASSISTANCE NEEDED - Dual xbrowse header

Postby TimStone » Thu Dec 10, 2009 11:56 pm

Using xBrowse, I'm trying to use a type of Gannt chart for a calendar. Please look at the sample and you will see the problem with the display. :(

I want the day on the top header, and the hours below. The top header should cover the range of hours ( 8 - 5 ) for the day. So hour 8 is header type 2, 9 to 4 are header type 1, and 5 is header type 3. This repeats. Of course the setup is done with the appropriate columns. Note that the 5 is using a characteristic of type 0, not 3, and the header stops before the end of the 4.

This is the result I get:

Image

Here is the code:

oCalW:nHeader := 1
oCalW:aHeaderTop := {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday"}
oCalW:aCols[ 1 ]:nHeaderType := 0
oCalW:aCols[ 2 ]:nHeaderType := 2
FOR mbx := 3 TO 10
oCalW:aCols[ mbx]:nHeaderType := 1
NEXT
oCalW:aCols[ 11]:nHeaderType := 3
oCalW:aCols[ 12]:nHeaderType := 2
FOR mbx := 13 TO 20
oCalW:aCols[ mbx]:nHeaderType := 1
NEXT
oCalW:aCols[ 21]:nHeaderType := 3
oCalW:aCols[ 22]:nHeaderType := 2
FOR mbx := 23 TO 30
oCalW:aCols[ mbx]:nHeaderType := 1
NEXT
oCalW:aCols[ 31]:nHeaderType := 3
oCalW:aCols[ 32]:nHeaderType := 2
FOR mbx := 33 TO 40
oCalW:aCols[ mbx]:nHeaderType := 1
NEXT
oCalW:aCols[ 41]:nHeaderType := 3
oCalW:aCols[ 42]:nHeaderType := 2
FOR mbx := 43 TO 50
oCalW:aCols[ mbx]:nHeaderType := 1
NEXT
oCalW:aCols[ 51]:nHeaderType := 3


Any ideas ?
Last edited by TimStone on Sun Dec 20, 2009 10:25 pm, edited 2 times in total.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: xBrowse Top Header DISPLAY ERROR - Ideas ?

Postby Antonio Linares » Wed Dec 16, 2009 10:00 am

Tim,

Could you please "paint" (mspaint) the result that you would like to get and post it here ? 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

Re: xBrowse Top Header DISPLAY ERROR - Ideas ?

Postby James Bott » Wed Dec 16, 2009 3:58 pm

Antonio,

I think it is supposed to look like this:

Image


Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: xBrowse Top Header DISPLAY ERROR - Ideas ?

Postby TimStone » Wed Dec 16, 2009 4:36 pm

Antonio,

James did it ( looking at the adjustment for Monday display ). The numbers are the hours of the day, from 8 to 5, and so the top header Monday should cover all of those hours. I believe I implemented the code correctly, but the display is off. Of course it needs to display correctly for all 5 days, Monday through Friday.

Thanks ...
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: ASSISTANCE NEEDED - Dual xbrowse header

Postby TimStone » Sun Dec 20, 2009 10:26 pm

I showed a current display of the top header, and James showed a visual of how it should look, but after a week, doesn't anyone have an idea what is wrong here ?

I would sure love to fix this ... it looks pretty bad.

Thanks.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: ASSISTANCE NEEDED - Dual xbrowse header

Postby Silvio » Mon Dec 21, 2009 12:16 pm

Tim
If you send me a sample of it I can see what Multiheader make and where is the error
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: ASSISTANCE NEEDED - Dual xbrowse header

Postby TimStone » Mon Dec 21, 2009 4:33 pm

The code is in the original message at the top of this thread.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: ASSISTANCE NEEDED - Dual xbrowse header

Postby Silvio » Mon Dec 21, 2009 5:01 pm

i CANNOT COMPILED IT
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: ASSISTANCE NEEDED - Dual xbrowse header

Postby TimStone » Mon Dec 21, 2009 5:31 pm

Silvio,

It is not possible to post all of the code that leads to this. I assumed others use the top header option in Xbrowse and would look at the implementation above and see what is wrong, or have experienced something similar. Apparently either no one is using Top Header, or there is something unique here. From the documentation and sample, what I posted should be correct ...but it doesn't display correctly.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: ASSISTANCE NEEDED - Dual xbrowse header

Postby Silvio » Mon Dec 21, 2009 6:02 pm

you can post a small sample test to see the problem
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: ASSISTANCE NEEDED - Dual xbrowse header

Postby nageswaragunupudi » Tue Dec 22, 2009 4:11 am

Please search for this code in the METHOD Paint() in XBrowse.Prg
Code: Select all  Expand view
              ElseIf oCol:nHeaderType==3
                  MoveTo( hDC, nCol - 2, nRow + 0 )
                  LineTo( hDC, nCol - 2, nRow + nHeight - 0, hHeaderPen )
                  oCol:PaintHeader( nRow , nCol-1, nHeight,,,oCol:nWidth+1, oCol:cHeader )
                  MoveTo( hDC, nColIni - 2, nRow + nHeight/2 )
                  LineTo( hDC, nCol - 2, nRow + nHeight/2, hHeaderPen )
                  nHeaderTop++
                  oCol:PaintHeader( nRow - 0, nColIni-1, nHeight/2,,,nWidthHeaderTop+1, ::aHeaderTop[nHeaderTop] )
                  nWidthHeaderTop:=0
 

Please replace the entire block above with the code given below
Code: Select all  Expand view
              ElseIf oCol:nHeaderType==3
                  MoveTo( hDC, nCol - 2, nRow + 0 )
                  LineTo( hDC, nCol - 2, nRow + nHeight - 0, hHeaderPen )
                  oCol:PaintHeader( nRow + nHeight/2, nCol-1, nHeight/2,,,oCol:nWidth+1, oCol:cHeader )
                  nWidthHeaderTop += oCol:nWidth+1
                  MoveTo( hDC, nColIni - 2, nRow + nHeight/2 )
                  LineTo( hDC, nColIni - 2 + nWidthHeaderTop, nRow + nHeight/2, hHeaderPen )
                  nHeaderTop++
                  oCol:PaintHeader( nRow - 0, nColIni-1, nHeight/2,,,nWidthHeaderTop+1, ::aHeaderTop[nHeaderTop] )
                  nWidthHeaderTop:=0
 

Now the headers should work as expected.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10622
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: ASSISTANCE NEEDED - Dual xbrowse header

Postby nageswaragunupudi » Tue Dec 22, 2009 5:17 am

Mr Silvio

Can you please clarify what for is nHeaderType == 4 ?
Documentation describes nHeaderType 1, 2 and 3 only but not 4.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10622
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: ASSISTANCE NEEDED - Dual xbrowse header

Postby Antonio Linares » Tue Dec 22, 2009 7:18 am

Tim,

Sorry for the delay but I was for a few days out of the office.

Fortunatly our dear friend and master, Rao, managed to provide you a solution :-)
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

Re: ASSISTANCE NEEDED - Dual xbrowse header

Postby Silvio » Tue Dec 22, 2009 2:17 pm

Nas,
4 is to close ( sum 3+1 =4)
see the testhead.prg

xColBrw[03] := { "Street", AL_CENTER, .T., 70, AL_LEFT, "@30", 1, { |o| (oBrw:cAlias)->STREET }, { || (oBrw:cAlias)->STREET }, 4, AL_RIGHT }
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: ASSISTANCE NEEDED - Dual xbrowse header

Postby TimStone » Tue Dec 22, 2009 3:37 pm

Thank you. That takes care of the 5 displaying as a status 1 ( full height ), but the top bar still does not extend fully to the right of the last column it covers. It appears to be about 1/3 of the way across the column. You can see this in the sample above where it covers only part of the column with the number 4.

At least this looks better. Thanks for the edit.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 42 guests