Autore Topic: gb.Report : impostare il colore di label  (Letto 598 volte)

Offline vuott

  • Moderatore globale
  • Senatore Gambero
  • *****
  • Post: 11.316
  • Ne mors quidem nos iunget
    • Mostra profilo
gb.Report : impostare il colore di label
« il: 10 Gennaio 2014, 15:34:34 »
Vi riporto questa discussoine apparsa nella M.L. ufficiale:


" More learning curve!  I am trying to set the foreground and background colors for a report label:

Codice: gambas [Seleziona]
Dim lblType as new ReportLabel

lblType.Text = $currProblem.ProblemType.Value
lblType.Brush = Report.Color($currProblem.ProblemType.ForeColor)
lblType.BackGround = Report.Color($currProblem.ProblemType.BackColor)



$currProblem.ProblemType.Forecolor is 22015 (i.e.mid blue)

I get
 ----------------------------------------
ERR: Unknown symbol '_iValue' in class 'ReportBrush' (11)
Report.Color.365
RProblemDetail._new.18
MTEST.Main.9
 ----------------------------------------

 What am I doing wrong?

 Bruce
"


" Use reportbrush.color instead

Fabien Bodard
"
« Chiunque, non ricorrendo lo stato di necessità, nel proprio progetto Gambas fa uso delle istruzioni Shell o Exec, è punito con la sanzione pecuniaria da euro 20,00 a euro 60,00. »

Offline vuott

  • Moderatore globale
  • Senatore Gambero
  • *****
  • Post: 11.316
  • Ne mors quidem nos iunget
    • Mostra profilo
Re: gb.Report : impostare il colore di label
« Risposta #1 il: 22 Gennaio 2014, 12:44:21 »
Nella M.L. ufficiale si aggiunge una domanda analoga:


" I'm starting using report control but cannot find a way to set a label color , I've try with something like:

lblID.Brush = ReportBrush.Color(Color.red)
lblID.BackGround = ReportBrush.Color(Color.Yellow)

It don't show error but don't change anythink.

any idea ?

Thank's in advance,
Marco.
"


" Thank you for the advise... it's corrected in the last rev 6099.

Fabien Bodard
"


" I'm starting to use gb report component in gambas3. It works very fine and I
was able to realize all I need. I saw a post with bug reporting about
reportbrush.color problem.
Is it a solve problem ?? I try to change the font color and background color
in a ReportLabel

Codice: gambas [Seleziona]
.Brush = ReportBrush.Color(Color.Cyan)
.BackGround = ReportBrush.Color(Color.Cyan)

nothing change.... I make something wrong or the bug is not solved too ???

thank a lot
kungfupanda
"


" it is solved but actually only on the svn version. You need to wait
for release if you don't use this

you can use as workarround:


Codice: gambas [Seleziona]
.Background = ReportBrush["#FF0000FF"]


Regards,

Fabien
"
« Ultima modifica: 03 Febbraio 2014, 10:12:58 da vuott »
« Chiunque, non ricorrendo lo stato di necessità, nel proprio progetto Gambas fa uso delle istruzioni Shell o Exec, è punito con la sanzione pecuniaria da euro 20,00 a euro 60,00. »