Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #12574 > unrolled thread

bBrowser CompoundField

Started byFranz Rachbauer <office@rachbauer.org>
First post2019-08-03 10:38 +0200
Last post2019-08-19 08:13 -0700
Articles 4 — 2 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  bBrowser CompoundField Franz Rachbauer <office@rachbauer.org> - 2019-08-03 10:38 +0200
    Re: bBrowser CompoundField Gianluca72 <gianluca.pinoli@proximacentauri.it> - 2019-08-19 06:36 -0700
      Re: bBrowser CompoundField Franz Rachbauer <office@rachbauer.org> - 2019-08-19 16:54 +0200
        Re: bBrowser CompoundField Gianluca72 <gianluca.pinoli@proximacentauri.it> - 2019-08-19 08:13 -0700

#12574 — bBrowser CompoundField

FromFranz Rachbauer <office@rachbauer.org>
Date2019-08-03 10:38 +0200
SubjectbBrowser CompoundField
Message-ID<qi3h6l$u6e$3@gioia.aioe.org>
Hi,
is it possible to do a compound field with bBrowser containing an image 
combined with text under the image?

If I do an image column I have to give typ Object and I cannot combine 
it with text.

Regards, Franz

[toc] | [next] | [standalone]


#12590

FromGianluca72 <gianluca.pinoli@proximacentauri.it>
Date2019-08-19 06:36 -0700
Message-ID<fefed76d-f571-4278-b096-c1186e1ceb72@googlegroups.com>
In reply to#12574
Il giorno sabato 3 agosto 2019 10:38:46 UTC+2, Franz Rachbauer ha scritto:
> Hi,
> is it possible to do a compound field with bBrowser containing an image 
> combined with text under the image?
> 
> If I do an image column I have to give typ Object and I cannot combine 
> it with text.
> 
> Regards, Franz

Hi Franz,
you could use bCompoundValue{}



You could define your column in this way:


oColumn := bDataColumn{SELF:oDCbBrowserClassifica, SELF:oDCbBrowserClassifica:Server, {|oServer, oSelf| oSelf:GetCompoundValueCLASSIFICHE(oServer)}, #Expression, SELF}


and create a method that define the content oc the cell like this:


METHOD GetCompoundValueCLASSIFICHE(oServer) CLASS DisplayWin
	// create compound value object
	LOCAL ocvValue			AS bCompoundValue
	LOCAL ocvSubValue			AS bCompoundValue
	LOCAL oCOLOR AS COLOR

	DO CASE
	 CASE oServer:SEZ == 'GAM'
	 	oCOLOR := oColorGAM
	 CASE oServer:SEZ == 'GAF'
	 	oCOLOR := oColorGAF
	 OTHERWISE   //TE
	 	oCOLOR := oColorTE
	ENDCASE

	// create compound value object
	ocvValue := bCompoundValue{}
	ocvValue:InactiveSelectedBackground := SELF:oDCbBrowserClassifica:Background
	ocvValue:SelectedBackground := SELF:oDCbBrowserClassifica:Background
	
	ocvSubValue := (bCompoundValue{AllTrim(oServer:NUMERO), Point{5, 0}, Dimension{45 , -1}, BALIGN_RIGHT  , Color{COLORyellow}, , Font{, 27, "Tahoma"}  } )
	ocvSubValue:SelectedForeground := Color{COLORyellow}
	ocvSubValue:InactiveSelectedForeground := Color{COLORyellow}
	ocvValue:AddValue( ocvSubValue )


	ocvSubValue := (bCompoundValue{oServer:ATLETA, Point{70, 0}, Dimension{450 , -1}, BALIGN_LEFT  , Color{COLORwhite}, , Font{, 27, "Tahoma"}  } )
	ocvSubValue:SelectedForeground := Color{COLORwhite}
	ocvSubValue:InactiveSelectedForeground := Color{COLORwhite}
	ocvSubValue:ValueOptions := BVO_END_ELLIPSIS
	*ocvSubValue:ValueOptions := BVO_WORDBREAK
	ocvValue:AddValue( ocvSubValue )

	ocvSubValue := (bCompoundValue{oServer:RISULTATO, Point{560, 0}, Dimension{150 , -1}, BALIGN_RIGHT  , Color{COLORyellow}, , Font{, 27, "Tahoma"}  } )
	ocvSubValue:SelectedForeground := Color{COLORyellow}
	ocvSubValue:InactiveSelectedForeground := Color{COLORyellow}
	ocvValue:AddValue( ocvSubValue )

	ocvSubValue := (bCompoundValue{oServer:NOTAD, Point{710, 0}, Dimension{70 , -1}, BALIGN_RIGHT  , Color{COLORyellow}, , Font{, 27, "Tahoma"}  } )
	ocvSubValue:SelectedForeground := Color{COLORyellow}
	ocvSubValue:InactiveSelectedForeground := Color{COLORyellow}
	ocvValue:AddValue( ocvSubValue )

	*ocvSubValue := (bCompoundValue{oServer:SQUADRA, Point{420, 0}, Dimension{170 , -1}, BALIGN_LEFT  , Color{COLORwhite}, , Font{, 25, "Tahoma"}  } )
	*ocvSubValue:SelectedForeground := Color{COLORwhite}
	*ocvSubValue:InactiveSelectedForeground := Color{COLORwhite}
	*ocvValue:AddValue( ocvSubValue )


	ocvSubValue := (bCompoundValue{ BICON{  GetNationalIcon(AllTrim(oServer:NAZIONE)) ,DIMENSION{32,32} }, Point{530, 6}, Dimension{32 , -1}, BALIGN_CENTER  , oCOLOR, , Font{, 14, "Tahoma"}  } )
	ocvSubValue:SelectedForeground := oCOLOR
	ocvSubValue:InactiveSelectedForeground := oCOLOR
	ocvValue:AddValue( ocvSubValue )



	// return compound value object
	RETURN ocvValue




Regards
Gianluca

[toc] | [prev] | [next] | [standalone]


#12592

FromFranz Rachbauer <office@rachbauer.org>
Date2019-08-19 16:54 +0200
Message-ID<qjed7f$blb$1@gioia.aioe.org>
In reply to#12590
Hi Gianluca,
you use bIcon with an Icon of 32x32, but is it possible to use a bitmap 
with 100x120 like http://www.rachbauer.org/bild1.jpg shows?

Regards, Franz

Am 19.08.2019 um 15:36 schrieb Gianluca72:
> Il giorno sabato 3 agosto 2019 10:38:46 UTC+2, Franz Rachbauer ha scritto:
>> Hi,
>> is it possible to do a compound field with bBrowser containing an image
>> combined with text under the image?
>>
>> If I do an image column I have to give typ Object and I cannot combine
>> it with text.
>>
>> Regards, Franz
> 
> Hi Franz,
> you could use bCompoundValue{}
> 
> 
> 
> You could define your column in this way:
> 
> 
> oColumn := bDataColumn{SELF:oDCbBrowserClassifica, SELF:oDCbBrowserClassifica:Server, {|oServer, oSelf| oSelf:GetCompoundValueCLASSIFICHE(oServer)}, #Expression, SELF}
> 
> 
> and create a method that define the content oc the cell like this:
> 
> 
> METHOD GetCompoundValueCLASSIFICHE(oServer) CLASS DisplayWin
> 	// create compound value object
> 	LOCAL ocvValue			AS bCompoundValue
> 	LOCAL ocvSubValue			AS bCompoundValue
> 	LOCAL oCOLOR AS COLOR
> 
> 	DO CASE
> 	 CASE oServer:SEZ == 'GAM'
> 	 	oCOLOR := oColorGAM
> 	 CASE oServer:SEZ == 'GAF'
> 	 	oCOLOR := oColorGAF
> 	 OTHERWISE   //TE
> 	 	oCOLOR := oColorTE
> 	ENDCASE
> 
> 	// create compound value object
> 	ocvValue := bCompoundValue{}
> 	ocvValue:InactiveSelectedBackground := SELF:oDCbBrowserClassifica:Background
> 	ocvValue:SelectedBackground := SELF:oDCbBrowserClassifica:Background
> 	
> 	ocvSubValue := (bCompoundValue{AllTrim(oServer:NUMERO), Point{5, 0}, Dimension{45 , -1}, BALIGN_RIGHT  , Color{COLORyellow}, , Font{, 27, "Tahoma"}  } )
> 	ocvSubValue:SelectedForeground := Color{COLORyellow}
> 	ocvSubValue:InactiveSelectedForeground := Color{COLORyellow}
> 	ocvValue:AddValue( ocvSubValue )
> 
> 
> 	ocvSubValue := (bCompoundValue{oServer:ATLETA, Point{70, 0}, Dimension{450 , -1}, BALIGN_LEFT  , Color{COLORwhite}, , Font{, 27, "Tahoma"}  } )
> 	ocvSubValue:SelectedForeground := Color{COLORwhite}
> 	ocvSubValue:InactiveSelectedForeground := Color{COLORwhite}
> 	ocvSubValue:ValueOptions := BVO_END_ELLIPSIS
> 	*ocvSubValue:ValueOptions := BVO_WORDBREAK
> 	ocvValue:AddValue( ocvSubValue )
> 
> 	ocvSubValue := (bCompoundValue{oServer:RISULTATO, Point{560, 0}, Dimension{150 , -1}, BALIGN_RIGHT  , Color{COLORyellow}, , Font{, 27, "Tahoma"}  } )
> 	ocvSubValue:SelectedForeground := Color{COLORyellow}
> 	ocvSubValue:InactiveSelectedForeground := Color{COLORyellow}
> 	ocvValue:AddValue( ocvSubValue )
> 
> 	ocvSubValue := (bCompoundValue{oServer:NOTAD, Point{710, 0}, Dimension{70 , -1}, BALIGN_RIGHT  , Color{COLORyellow}, , Font{, 27, "Tahoma"}  } )
> 	ocvSubValue:SelectedForeground := Color{COLORyellow}
> 	ocvSubValue:InactiveSelectedForeground := Color{COLORyellow}
> 	ocvValue:AddValue( ocvSubValue )
> 
> 	*ocvSubValue := (bCompoundValue{oServer:SQUADRA, Point{420, 0}, Dimension{170 , -1}, BALIGN_LEFT  , Color{COLORwhite}, , Font{, 25, "Tahoma"}  } )
> 	*ocvSubValue:SelectedForeground := Color{COLORwhite}
> 	*ocvSubValue:InactiveSelectedForeground := Color{COLORwhite}
> 	*ocvValue:AddValue( ocvSubValue )
> 
> 
> 	ocvSubValue := (bCompoundValue{ BICON{  GetNationalIcon(AllTrim(oServer:NAZIONE)) ,DIMENSION{32,32} }, Point{530, 6}, Dimension{32 , -1}, BALIGN_CENTER  , oCOLOR, , Font{, 14, "Tahoma"}  } )
> 	ocvSubValue:SelectedForeground := oCOLOR
> 	ocvSubValue:InactiveSelectedForeground := oCOLOR
> 	ocvValue:AddValue( ocvSubValue )
> 
> 
> 
> 	// return compound value object
> 	RETURN ocvValue
> 
> 
> 
> 
> Regards
> Gianluca
> 
> 

[toc] | [prev] | [next] | [standalone]


#12593

FromGianluca72 <gianluca.pinoli@proximacentauri.it>
Date2019-08-19 08:13 -0700
Message-ID<63768245-5e22-47ee-bbbb-e2479e7255c5@googlegroups.com>
In reply to#12592
Il giorno lunedì 19 agosto 2019 16:54:43 UTC+2, Franz Rachbauer ha scritto:
> Hi Gianluca,
> you use bIcon with an Icon of 32x32, but is it possible to use a bitmap 
> with 100x120 like http://www.rachbauer.org/bild1.jpg shows?
> 
> Regards, Franz
> 
> Am 19.08.2019 um 15:36 schrieb Gianluca72:
> > Il giorno sabato 3 agosto 2019 10:38:46 UTC+2, Franz Rachbauer ha scritto:
> >> Hi,
> >> is it possible to do a compound field with bBrowser containing an image
> >> combined with text under the image?
> >>
> >> If I do an image column I have to give typ Object and I cannot combine
> >> it with text.
> >>
> >> Regards, Franz
> > 
> > Hi Franz,
> > you could use bCompoundValue{}
> > 
> > 
> > 
> > You could define your column in this way:
> > 
> > 
> > oColumn := bDataColumn{SELF:oDCbBrowserClassifica, SELF:oDCbBrowserClassifica:Server, {|oServer, oSelf| oSelf:GetCompoundValueCLASSIFICHE(oServer)}, #Expression, SELF}
> > 
> > 
> > and create a method that define the content oc the cell like this:
> > 
> > 
> > METHOD GetCompoundValueCLASSIFICHE(oServer) CLASS DisplayWin
> > 	// create compound value object
> > 	LOCAL ocvValue			AS bCompoundValue
> > 	LOCAL ocvSubValue			AS bCompoundValue
> > 	LOCAL oCOLOR AS COLOR
> > 
> > 	DO CASE
> > 	 CASE oServer:SEZ == 'GAM'
> > 	 	oCOLOR := oColorGAM
> > 	 CASE oServer:SEZ == 'GAF'
> > 	 	oCOLOR := oColorGAF
> > 	 OTHERWISE   //TE
> > 	 	oCOLOR := oColorTE
> > 	ENDCASE
> > 
> > 	// create compound value object
> > 	ocvValue := bCompoundValue{}
> > 	ocvValue:InactiveSelectedBackground := SELF:oDCbBrowserClassifica:Background
> > 	ocvValue:SelectedBackground := SELF:oDCbBrowserClassifica:Background
> > 	
> > 	ocvSubValue := (bCompoundValue{AllTrim(oServer:NUMERO), Point{5, 0}, Dimension{45 , -1}, BALIGN_RIGHT  , Color{COLORyellow}, , Font{, 27, "Tahoma"}  } )
> > 	ocvSubValue:SelectedForeground := Color{COLORyellow}
> > 	ocvSubValue:InactiveSelectedForeground := Color{COLORyellow}
> > 	ocvValue:AddValue( ocvSubValue )
> > 
> > 
> > 	ocvSubValue := (bCompoundValue{oServer:ATLETA, Point{70, 0}, Dimension{450 , -1}, BALIGN_LEFT  , Color{COLORwhite}, , Font{, 27, "Tahoma"}  } )
> > 	ocvSubValue:SelectedForeground := Color{COLORwhite}
> > 	ocvSubValue:InactiveSelectedForeground := Color{COLORwhite}
> > 	ocvSubValue:ValueOptions := BVO_END_ELLIPSIS
> > 	*ocvSubValue:ValueOptions := BVO_WORDBREAK
> > 	ocvValue:AddValue( ocvSubValue )
> > 
> > 	ocvSubValue := (bCompoundValue{oServer:RISULTATO, Point{560, 0}, Dimension{150 , -1}, BALIGN_RIGHT  , Color{COLORyellow}, , Font{, 27, "Tahoma"}  } )
> > 	ocvSubValue:SelectedForeground := Color{COLORyellow}
> > 	ocvSubValue:InactiveSelectedForeground := Color{COLORyellow}
> > 	ocvValue:AddValue( ocvSubValue )
> > 
> > 	ocvSubValue := (bCompoundValue{oServer:NOTAD, Point{710, 0}, Dimension{70 , -1}, BALIGN_RIGHT  , Color{COLORyellow}, , Font{, 27, "Tahoma"}  } )
> > 	ocvSubValue:SelectedForeground := Color{COLORyellow}
> > 	ocvSubValue:InactiveSelectedForeground := Color{COLORyellow}
> > 	ocvValue:AddValue( ocvSubValue )
> > 
> > 	*ocvSubValue := (bCompoundValue{oServer:SQUADRA, Point{420, 0}, Dimension{170 , -1}, BALIGN_LEFT  , Color{COLORwhite}, , Font{, 25, "Tahoma"}  } )
> > 	*ocvSubValue:SelectedForeground := Color{COLORwhite}
> > 	*ocvSubValue:InactiveSelectedForeground := Color{COLORwhite}
> > 	*ocvValue:AddValue( ocvSubValue )
> > 
> > 
> > 	ocvSubValue := (bCompoundValue{ BICON{  GetNationalIcon(AllTrim(oServer:NAZIONE)) ,DIMENSION{32,32} }, Point{530, 6}, Dimension{32 , -1}, BALIGN_CENTER  , oCOLOR, , Font{, 14, "Tahoma"}  } )
> > 	ocvSubValue:SelectedForeground := oCOLOR
> > 	ocvSubValue:InactiveSelectedForeground := oCOLOR
> > 	ocvValue:AddValue( ocvSubValue )
> > 
> > 
> > 
> > 	// return compound value object
> > 	RETURN ocvValue
> > 
> > 
> > 
> > 
> > Regards
> > Gianluca
> > 
> >

Hi Franz,
this is how to use a resouce bitmap:

ocvCaption:AddValue(bCompoundValue{Bitmap{ ResourceID{String2Symbol("BMP_CL" ), _GetInst()} }, Point{665, 4}, Dimension{30 , -1}, BALIGN_CENTER  , , , Font{, 14, "Tahoma"}  } )

Regards
Gianluca

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web