Alaska Software Inc. - MultiRow tdHiBrowse
Username: Password:
AuthorTopic: MultiRow tdHiBrowse
Zupan Miran MultiRow tdHiBrowse
on Thu, 18 Aug 2016 09:52:05 +0200
Hello to all TopDown users
I know that many of you knows that, but in TD90 sample aplication I didn't find this solution (yet). 
  With tdTextBmp2 we can create 2 or 3 or ... rows in one cell of browse. Simply add code below to 
your  aFields:= { ... } definition 	


aFields:= { { {||{"bmp",{||tdTextBmp2({tdAmp(naziv),naziv2},350,30,"10.Arial CE",,2 ) }}} 
,"Naziv",.F.,,,,25 },;
             { {||{"bmp",{||tdTextBmp2({ulica,naslov},290,30,"10.Arial CE",,2 ) }}} ,"Naslov" 
,.F.,,,,22 },;
                 { "davcna_st","Davźna" ,.F.,,,, 7 },;
                 { "sifpar"   ,"ćifra"  ,.F.,,,, 5 },;
                 { {||{"bmp",{||tdTextBmp2({opombe1,tel_kli},190,30,"10.Arial CE",,2 ) }}} 
,"Kontaktna oseba;Telefon",.F.,,,,14 },;
                 { "e_mail"   ,"E-mail" ,.F.,,,,22 },;
                 { {||{"bmp",{||tdTextBmp2({trr1,swift1},190,30,"10.Arial CE",,2 ) }}} ,"TRR;SWIFT" 
,.F.,,,,14 },;
                 { "km"       ,"Potni"  ,.F.,,,, 5 },;
                 { "tip_kl"   ,"K/D"    ,.F.,,,, 3 },;
                 { "vk_oseba" ,"Tip;stranke",.F.,,,, 3,bColor4},;
                 { "crna"     ,"Pazi"   ,.F.,,,, 3,bColor },;
                 { "saldozne1","Promet" ,.F.,"9,999,999.99",,, 6,bColor },;
                 { "saldozne2","Plaźano",.F.,"9,999,999.99",,, 6,bColor },;
                 { "saldozne3","Razlika",.F.,"9,999,999.99",,, 6,bColor3} ;
                }

oBrowse:= tdHiBrow(1.2,1.5,nRows-5.0,nCols-1.5,.F.,.T.,.T.,; 
oStat,aFields,,tdMBROW_PP,,,"R",.T.,,,,,,,,,,,tdPGN,,,,,nSBclr)

Regards
Miran Zupan


---
Ta e-pošta je bila pregledana z Avast protivirusnim programom.
https://www.avast.com/antivirus


Multirow.zip
Zupan Miran Re: MultiRow tdHiBrowse
on Thu, 18 Aug 2016 10:11:45 +0200
OK, my mistake...
TD use tdTextBmp() with GraCaptionStr(oPS,{nXpos,nYpos-2}, ,aText[i],XBPALIGN_HCENTER)

      ************** write
      **** Use this with Xbase++ versions previous to 1.90 (does not handle "~")
//*** BEFORE      GraCaptionStr(oPS,{nXpos,nYpos-2}, ,aText[i],XBPALIGN_HCENTER)
     above instead of nXpos use 1 for the left most starting position of the text.
     also i would recommend that you send nSpc:=3 to tdTextBMP for a better line spacing.
     XBPALIGN_BOTTOM is so that the text is flat against the bottom of the graphic line area
     that way preventing a slight snake affect with different hieght text.


I use my own function tdTextBmp2() with GraCaptionStr(oPS,{1,nYpos-2}, ,aText[i],XBPALIGN_BOTTOM)

Regards
Miran Župan


---
Ta e-pošta je bila pregledana z Avast protivirusnim programom.
https://www.avast.com/antivirus