AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein GUI-Design mit VCL / FireMonkey / Common Controls Delphi Virtual Treeview - manueller Zeilenumbruch in Zelle
Thema durchsuchen
Ansicht
Themen-Optionen

Virtual Treeview - manueller Zeilenumbruch in Zelle

Ein Thema von micha888 · begonnen am 20. Jul 2008 · letzter Beitrag vom 20. Jul 2008
Antwort Antwort
micha888

Registriert seit: 20. Jun 2006
5 Beiträge
 
#1

Virtual Treeview - manueller Zeilenumbruch in Zelle

  Alt 20. Jul 2008, 10:16
Hallo,

ich möchte mehrere Strings in einer Zelle darstellen. Jeder String sollte in einer eigenen Zeile stehen.
Versucht habe ich folgende Kombinationen:

Delphi-Quellcode:
procedure TForm1.VirtualStringTree1GetText(Sender: TBaseVirtualTree;
  Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;
  var CellText: WideString);
begin
  Celltext := tx1 + WideChar(#11) + tx2
end;

procedure TForm1.VirtualStringTree1GetText(Sender: TBaseVirtualTree;
  Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;
  var CellText: WideString);
begin
  Celltext := tx1 + WideChar(#13) + tx2
end;

procedure TForm1.VirtualStringTree1GetText(Sender: TBaseVirtualTree;
  Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;
  var CellText: WideString);
begin
  Celltext := tx1 + WideChar(#13) + WideChar(#10) + tx2
end;
Es werden bei allen Varianten immer nur "Quadrätchen dargestellt", ein Zeilenumbruch wird nicht ausgeführt.

Hat jemand eine Idee, wie ich das hinbekomme?

Michael
  Mit Zitat antworten Zitat
Benutzerbild von toms
toms
(CodeLib-Manager)

Registriert seit: 10. Jun 2002
4.648 Beiträge
 
Delphi XE Professional
 
#2

Re: Virtual Treeview - manueller Zeilenumbruch in Zelle

  Alt 20. Jul 2008, 15:56
Hallo

Hier eine Antwort auf die Frage "Breaking text with #13#10 in Text?" von Mike Lischke aus seinem Forum:

Zitat:
Well, the problem is with the used APIs. In VirtualTrees.pas there is a DrawTextW implementation that deals with embedded new line chars. However this does not handle automatic word break. So on Windows NT/2k/XP I use the built-in API (Unicode is needed), which obviously does not handle hard line breaks then (although I expected it to work).

You can file a bug report if you think this is a serious limitation. Interestingly enough, so far nobody else missed hard line breaks.
Thomas
  Mit Zitat antworten Zitat
mkinzler
(Moderator)

Registriert seit: 9. Dez 2005
Ort: Heilbronn
39.851 Beiträge
 
Delphi 11 Alexandria
 
#3

Re: Virtual Treeview - manueller Zeilenumbruch in Zelle

  Alt 20. Jul 2008, 16:11
Dann bleibt ja nur eine eigene Implementation dieser Funktion
Markus Kinzler
  Mit Zitat antworten Zitat
micha888

Registriert seit: 20. Jun 2006
5 Beiträge
 
#4

Re: Virtual Treeview - manueller Zeilenumbruch in Zelle

  Alt 20. Jul 2008, 19:45
Hallo und Danke für eure Antworten.
Sieht so aus, als müsste ich mich da tiefer mit beschäftigen.

Michael
  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 15:43 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