AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein GUI-Design mit VCL / FireMonkey / Common Controls how do i remove white background in node inside virtual TVirtualStringTree?
Thema durchsuchen
Ansicht
Themen-Optionen

how do i remove white background in node inside virtual TVirtualStringTree?

Ein Thema von drama22 · begonnen am 6. Apr 2016 · letzter Beitrag vom 6. Apr 2016
Antwort Antwort
drama22

Registriert seit: 12. Jan 2013
88 Beiträge
 
#1

how do i remove white background in node inside virtual TVirtualStringTree?

  Alt 6. Apr 2016, 00:31
i tried to use TargetCanvas.Brush.Style := bsClear; inside BeforeCellPaint still node have white back ground here is the full code

Delphi-Quellcode:
procedure TForm2.VTs1BeforeCellPaint(Sender: TBaseVirtualTree;
  TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
  CellPaintMode: TVTCellPaintMode; CellRect: TRect; var ContentRect: TRect);
begin
TargetCanvas.Brush.Style := bsClear;
TargetCanvas.FillRect(CellRect);
end;
  Mit Zitat antworten Zitat
Benutzerbild von Zacherl
Zacherl

Registriert seit: 3. Sep 2004
4.629 Beiträge
 
Delphi 10.2 Tokyo Starter
 
#2

AW: how do i remove white background in node inside virtual TVirtualStringTree?

  Alt 6. Apr 2016, 11:08
What exactly are you trying to do?

You can set a custom color for each row like this:
Delphi-Quellcode:
procedure TfrmMain.EditorTreeBeforeItemErase(Sender: TBaseVirtualTree; TargetCanvas: TCanvas;
  Node: PVirtualNode; ItemRect: TRect; var ItemColor: TColor; var EraseAction: TItemEraseAction);
begin
  EraseAction := eaColor;
  ItemColor := clBlue;
end;
If you like to use colored rows while using a background image, try this:
http://stackoverflow.com/a/10537589
Projekte:
- GitHub (Profil, zyantific)
- zYan Disassembler Engine ( Zydis Online, Zydis GitHub)
  Mit Zitat antworten Zitat
drama22

Registriert seit: 12. Jan 2013
88 Beiträge
 
#3

AW: how do i remove white background in node inside virtual TVirtualStringTree?

  Alt 6. Apr 2016, 13:32
What exactly are you trying to do?
i dont want any back ground around the cell just the text
  Mit Zitat antworten Zitat
Benutzerbild von Zacherl
Zacherl

Registriert seit: 3. Sep 2004
4.629 Beiträge
 
Delphi 10.2 Tokyo Starter
 
#4

AW: how do i remove white background in node inside virtual TVirtualStringTree?

  Alt 6. Apr 2016, 13:57
So you want to make the cell transparent? I don't think that's possible at all :/ There might be a hacky way by manually drawing the contents of the parent canvas before printing the text, but I never saw something like that in action.
Projekte:
- GitHub (Profil, zyantific)
- zYan Disassembler Engine ( Zydis Online, Zydis GitHub)
  Mit Zitat antworten Zitat
drama22

Registriert seit: 12. Jan 2013
88 Beiträge
 
#5

AW: how do i remove white background in node inside virtual TVirtualStringTree?

  Alt 6. Apr 2016, 14:17
So you want to make the cell transparent? I don't think that's possible at all :/ There might be a hacky way by manually drawing the contents of the parent canvas before printing the text, but I never saw something like that in action.
i think there is way because i found something like that in action

Geändert von drama22 ( 6. Apr 2016 um 22:17 Uhr)
  Mit Zitat antworten Zitat
Benutzerbild von Zacherl
Zacherl

Registriert seit: 3. Sep 2004
4.629 Beiträge
 
Delphi 10.2 Tokyo Starter
 
#6

AW: how do i remove white background in node inside virtual TVirtualStringTree?

  Alt 6. Apr 2016, 14:50
i found something like that in action see this image
I can't even see the actual VirtualStringTree control on this picture Is it the gradient thingy in the background?
Projekte:
- GitHub (Profil, zyantific)
- zYan Disassembler Engine ( Zydis Online, Zydis GitHub)
  Mit Zitat antworten Zitat
drama22

Registriert seit: 12. Jan 2013
88 Beiträge
 
#7

AW: how do i remove white background in node inside virtual TVirtualStringTree?

  Alt 6. Apr 2016, 15:03

I can't even see the actual VirtualStringTree control on this picture Is it the gradient thingy in the background?
this gradient can be drawn easy on paint-background as eg .
Delphi-Quellcode:
procedure TForm2.VTs1PaintBackground(Sender: TBaseVirtualTree;
  TargetCanvas: TCanvas; R: TRect; var Handled: Boolean);
begin
 //
  GradientFillCanvas(TargetCanvas, clred, clWhite, R, gdHorizontal); // GraphUtil
  Handled := True;

end;
the white bg of node is the issue see my example
Miniaturansicht angehängter Grafiken
copied.jpg  

Geändert von drama22 ( 6. Apr 2016 um 22:19 Uhr)
  Mit Zitat antworten Zitat
Benutzerbild von uligerhardt
uligerhardt

Registriert seit: 19. Aug 2004
Ort: Hof/Saale
1.735 Beiträge
 
Delphi 2007 Professional
 
#8

AW: how do i remove white background in node inside virtual TVirtualStringTree?

  Alt 6. Apr 2016, 15:14
Please use the attachment feature of this forum for pictures. File hosters are blocked at my workplace (and that of others too, I guess).
Uli Gerhardt
  Mit Zitat antworten Zitat
drama22

Registriert seit: 12. Jan 2013
88 Beiträge
 
#9

AW: how do i remove white background in node inside virtual TVirtualStringTree?

  Alt 6. Apr 2016, 22:19
Please use the attachment feature of this forum for pictures. File hosters are blocked at my workplace (and that of others too, I guess).
image attached .
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 01:28 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz