Autor Beitrag
MDX
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 595
Erhaltene Danke: 4

Windows 8.1, Linux Debian 8, Android Lollipop
Delphi, PHP, Java (Android)
BeitragVerfasst: Fr 27.05.11 23:11 
Heyho,

ich schreibe gerade ein Programm und bin dafür auf der Suche nach einer alternative zu dem TValueListEditor (der bei Delphi dabei ist), womit ich mehrere Zeilen und Spalten (mehr als 2) einfügen kann, beliebige dieser Spalten (immer dieselben Spalten pro Zeile) editierbar machen will und das ganze soll am besten auch noch mit Überschriften versehen werden können... ^^

Ich hab jetzt schon das halbe Internet (na okay, vielleicht nicht ganz :P) durchgeschaut, aber hab leider nicht mal annährend sowas gefunden, oder vielleicht bin ich auch einfach nur unfähig, Dinge richtig zu lesen :roll: ...

Jedenfalls bräuchte ich so etwas, also wäre es Nett wenn jemand eine derartige Komponente kennt, sie mir empfehlen würde ;)

Danke euch!

BTW: Ich bräuchte das ganze für RAD Studio XE...
Hobby-Programmierer
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 238
Erhaltene Danke: 4

Win XP Pro, Vista Ultimate Trial :o)
D6 Pro, D7 Pro, Turbo, XE SE
BeitragVerfasst: Fr 27.05.11 23:59 
Moin ...,
warum nimmst du nicht einfach ein StringGrid? Ob die jeweilige Zelle bearbeiten werden darf, kannst du mit eigener Logik steuern, ebenso das aussehen.

LG Mario
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19338
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 28.05.11 04:40 
Wie wäre es mit TVirtualStringTree? ;-)
MDX Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 595
Erhaltene Danke: 4

Windows 8.1, Linux Debian 8, Android Lollipop
Delphi, PHP, Java (Android)
BeitragVerfasst: Sa 28.05.11 12:44 
Mh ich hab das TVirtualStringTree dieses mal gefunden (hatte das letzte mal nach View statt Tree gesucht... ^^) aber wenn ich das jetzt Installiere und danach versuche zu starten kommt
Zitat:
[DCC Fataler Fehler] Unit1.pas(11): F1026 Datei nicht gefunden: 'VirtualTrees.dcu'

Aber in keinem von den Ordnern (hier: C:\Users\Public\Documents\Soft Gems\Virtual Treeview) ist auch nur eine .dcu Datei, was mach ich falsch? :D
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19338
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 28.05.11 12:57 
Dann hat das Setup wohl den Unterordner Source dieses Ordners nicht zum Bibliothekspfad hinzugefügt, das kannst du ja nachholen. ;-)
MDX Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 595
Erhaltene Danke: 4

Windows 8.1, Linux Debian 8, Android Lollipop
Delphi, PHP, Java (Android)
BeitragVerfasst: Sa 28.05.11 13:02 
Mh hatte ich gerade gemacht... Dannach ging erstmal gar nix mehr :D
Zitat:
[DCC Fataler Fehler] F1027 Unit nicht gefunden: 'System.pas' oder binäres Äquivalent (.dcu)


Habs aber zum Glück wieder hinbekommen...
Na dann versuch ich mein Glück mal mit dem Dings :D
MDX Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 595
Erhaltene Danke: 4

Windows 8.1, Linux Debian 8, Android Lollipop
Delphi, PHP, Java (Android)
BeitragVerfasst: Sa 28.05.11 14:33 
Okay, ich habs jz so einigermaßen hinbekommen, aber ich bekomme jz eine Fehlermeldung wenn ich Daten hinzufügen will:
Zitat:
Zugriffsverletzung bei Adresse 00407A83 in Modul 'Project1.exe'. Lesen von Adresse 05019F7C.



Mein Code dazu sieht so aus:
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
[...]

type
TEntry = class(TObject)
  public
    wID: string;
    wName: string;
    wTyp: string;
    wPortal: string;
    wStatus: string;
    wSize: string;
  end;
  TEntries = class(TEntry)
  public
  end;

[...]

var
[...]
daten : TEntry;
newEntry : TEntries;
node: PVirtualNode;
begin
I:=combobox1.ItemIndex;
  daten := TEntry.Create;
  with daten do
  begin
    wID :=GetID(PWideChar(edit1.Text));
    wName := HTMLDecode(GetTitle(PWideChar(edit1.Text)));
    wTyp := Extension.Strings[i];
    wPortal := 'WikiPedia.de';
    wStatus := '-';
    wSize := '-';
  end;
  vst.AddChild(nil,daten);


Was ist hier falsch!? :?:
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19338
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 28.05.11 15:34 
In welcher Zeile tritt die Exception denn auf?
MDX Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 595
Erhaltene Danke: 4

Windows 8.1, Linux Debian 8, Android Lollipop
Delphi, PHP, Java (Android)
BeitragVerfasst: Sa 28.05.11 15:59 
Mh scheinbar liegt es an meinen Funktionen, darum wollte ich jz wID und wName mit Dummy-Werte befüllen, aber jetzt bekomme ich die Meldung:
Zitat:
Cannot set initial user data because there is not enough user data space allocated.
:?:

Tritt bei   vst.AddChild(nil,daten); auf...
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19338
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: So 29.05.11 02:09 
Du musst UserDataSize auf die Grüße der Daten setzen. In deinem Fall dann wohl auf SizeOf(daten).
MDX Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 595
Erhaltene Danke: 4

Windows 8.1, Linux Debian 8, Android Lollipop
Delphi, PHP, Java (Android)
BeitragVerfasst: So 29.05.11 02:20 
Ich denk mal du meintest dass in etwa so?
ausblenden Delphi-Quelltext
1:
VST.NodeDataSize:=SizeOf(daten);					


Jetzt bekomme ich leider
Zitat:
Listenindex überschreitet das Maximum (13102368)
... :(



Edit:
Das kommt von was ganz anderem -.-

Naja, jedenfalls steht jetzt in der Spalte "node"... ??
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19338
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: So 29.05.11 02:25 
Du musst OnGetText behandeln. Darin musst du aus dem aktuellen Knoten den Text der Spalte auslesen und der Komponente in CellText mitteilen.

Denn was da für Daten in dem Pointer liegen, weißt nur du. ;-)

Bevor du fragst: An die Daten zu einem Knoten kommst du mit GetNodeData. ;-)
MDX Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 595
Erhaltene Danke: 4

Windows 8.1, Linux Debian 8, Android Lollipop
Delphi, PHP, Java (Android)
BeitragVerfasst: So 29.05.11 02:34 
... mein Erfolgloser Versuch mit
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
procedure TForm1.VSTGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
  Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
  var
  kdaten:TEntries;
begin
kdaten:=VST.GetNodeData(node);
    case Column of
      0: CellText:=kdaten.wid;
      1: CellText:=kdaten.wname;
      2: CellText:=kdaten.wtyp;
    end;
end;


endet mit
Zitat:
Zugriffsverletzung bei Adresse 004032F7 in Modul 'Project1.exe'. Lesen von Adresse 00000000.
und zwar bei 0: CellText:=kdaten.wid;

Ich verzweifel hier langsam... :oops:
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19338
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: So 29.05.11 03:30 
ausblenden Delphi-Quelltext
1:
kdaten:=VST.GetNodeData(node)^;					
MDX Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 595
Erhaltene Danke: 4

Windows 8.1, Linux Debian 8, Android Lollipop
Delphi, PHP, Java (Android)
BeitragVerfasst: So 29.05.11 03:50 
WTF....
Zitat:
[DCC Fehler] Unit1.pas(491): E2010 Inkompatible Typen: 'TEntries' und 'procedure, untyped pointer or untyped parameter'
:x

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
procedure TForm1.VSTGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
  Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
  var
  kdaten:TEntries;
begin
kdaten:=VST.GetNodeData(node)^;

    case Column of
      0: CellText:=kdaten.videoid;
      1: CellText:=kdaten.videoname;
      2: CellText:=kdaten.videotyp;
end;
end;
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19338
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: So 29.05.11 04:26 
ausblenden Delphi-Quelltext
1:
kdaten:=TEntries(VST.GetNodeData(node)^);					
MDX Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 595
Erhaltene Danke: 4

Windows 8.1, Linux Debian 8, Android Lollipop
Delphi, PHP, Java (Android)
BeitragVerfasst: So 29.05.11 11:54 
Danke, danke es funktioniert endlich! :D