Autor Beitrag
marvin190
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 55

Win XP, SuSe Linux 10.1
Delphi 3/5/2005 Personal; C++ Builder 6
BeitragVerfasst: Mo 25.09.06 17:01 
Hallo zusammen!

Wie würdet ihr ein Periodensystem darstellen, wenn man darin noch einzelne Elemente auswählen können muss?

Ich tendiere im Moment zum StringGrid, aber wisst ihr vielleicht etwas besseres, da es aufwändig ist alle Daten da hinein zuschreiben...

thx schonmal!

_________________
Mfg Marvin
Carpe Diem! - Genieße den Tag! - [gr. Horaz]
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Mo 25.09.06 18:56 
Hallo,

kommt darauf an was Du mit "einzelne Elemente auswählen" meinst.
Soll das Element nur markiert werden können, oder soll damit auch eine Aktion(Event) verbunden sein?

Daten ins StringGrid schreiben ist nicht aufwändig, eventuell das Formatieren der Daten, jenachdem wie hoch Deine Ansprüche sind.

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
marvin190 Threadstarter
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 55

Win XP, SuSe Linux 10.1
Delphi 3/5/2005 Personal; C++ Builder 6
BeitragVerfasst: Mo 25.09.06 19:07 
Also auswählen würde schon reichen, was ja TStringgrid.Selected ganz gut löst, aber wenn ich mir vorstelle, dass ich alle 105 Elemente per TStringgrid.Cells[x,y] := 'H'; etc eingeben muss, ist das schon eine große aktion und ich dachte vielleicht gibt es eine Komponente, mit der man das einfacher erledigen kann.

//edit: eine Aktion damit verbinden würde die Sache aber noch erheblich erleichtern, also wenn das möglich ist ;-)

_________________
Mfg Marvin
Carpe Diem! - Genieße den Tag! - [gr. Horaz]
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Mo 25.09.06 19:32 
Hallo,

für die Aktion schau Dir mal das Ereignis OnSelectCell an.

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
Deathman
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 52

Win XP
Turbo Pascal, Delphi 6, Delphi 2006
BeitragVerfasst: Mo 25.09.06 19:32 
was hälst du denn davon wenn du dir ein Perioden system einscannst und dann jedes Element als Image machst, dann hast du die möglichtkeit alles mögliche damit zu machen.
Ich weiß, das eingeben ist nicht wirklich einfacher aber, da es sich nicht jeden tag ändern wird dürfte es die arbeit wert sein.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 25.09.06 19:40 
Moin!

Hier sind schonmal die Elemente: ;)
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
const
  ELEMENT_LISTE =
    'H,He,Li,Be,B,C,N,O,'+
    'F,Ne,Na,Mg,Al,Si,P,S,'+
    'Cl,Ar,K,Ca,Sc,Ti,V,Cr,'+
    'Mn,Fe,Co,Ni,Cu,Zn,Ga,Ge,'+
    'As,Se,Br,Kr,Rb,Sr,Y,Zr,'+
    'Nb,Mo,Tc,Ru,Rh,Pd,Ag,Cd,'+
    'In,Sn,Sb,Te,I,Xe,Cs,Ba,'+
    'La,Ce,Pr,Nd,Pm,Sm,Eu,Gd,'+
    'Tb,Dy,Ho,Er,Tm,Yb,Lu,Hf,'+
    'Ta,W,Re,Os,Ir,Pt,Au,Hg,'+
    'Tl,Pb,Bi,Po,At,Rn,Fr,Ra,'+
    'Ac,Th,Pa,U,Np,Pu,Am,Cm,'+
    'Bk,Cf,Es,Fm,Md,No,Lr,Rf,'+
    'Db,Sg,Bh,Hs,Mt,Ds,Rg,Uub,'+
    'Uut,Uuq,Uup,Uuh,Uus,Uuo';

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
Deathman
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 52

Win XP
Turbo Pascal, Delphi 6, Delphi 2006
BeitragVerfasst: Mo 25.09.06 19:43 
Danke das Periodensystem kenn ich selber aso ich hab auch nen Tafelwerk.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 25.09.06 19:45 
Moin!

Aber du wolltest dir doch das Abtippen ersparen - deshalb hab ich dir schonmal die Liste gegeben, die hatte ich ja schon im CommaText-Format. Jetzt kannst du doch algorithmisch das StringGrid füllen. ;)

//EDIT: äh, ich seh grade, user profile iconDeathman ist ja gar nicht der Thread-Ersteller... :P

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
marvin190 Threadstarter
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 55

Win XP, SuSe Linux 10.1
Delphi 3/5/2005 Personal; C++ Builder 6
BeitragVerfasst: Mo 25.09.06 19:53 
Also die Werte als CSV hatte ich schon, das mit den Images is auch eine gute Möglichkeit!

Ich denke ich mach das mit dem Stringgrid.

Danke für eure Hilfe!

_________________
Mfg Marvin
Carpe Diem! - Genieße den Tag! - [gr. Horaz]
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Mo 25.09.06 22:11 
Hallo,

hab da noch was für Dich:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
const PeriodenSysArray : Array [0..8,0..17] of String =
     (('H','','','','','','','','','','','','','','','','','He'),
     ('Li','Be','','','','','','','','','','','B','C','N','O','F','Ne'),
     ('Na','Mg','','','','','','','','','','','Al','Si','P','S','Cl','Ar'),
     ('K','Ca','Sc','Ti','V','Cr','Mn','Fe','Co','Ni','Cu','Zn','Ga','Ge','As','Se','Br','Kr'),
     ('Rb','Sr','Y','Zr','Nb','Mo','Tc','Ru','Rh','Pd','Ag','Cd','In','Sn','Sb','Te','I','Xe'),
     ('Cs','Ba','*','Hf','Ta','W','Re','Os','Ir','Pt','Au','Hg','Tl','Pb','Bi','Po','At','Rn'),
     ('Fr','Ra','**','Rf','Db','Sg','Bh','Hs','Mt','Ds','Rg','Uub','Uut','Uuq','Uup','Uuh','Uus','Uuo'),
     ('','*','La','Ce','Pr','Nd','Pm','Sm','Eu','Gd','Tb','Dy','Ho','Er','Tm','Yb','Lu',''),
     ('','**','Ac','Th','Pa','U','Np','Pu','Am','Cm','Bk','Cf','Es','Fm','Md','No','Lr',''));
var c,r : Integer;
begin
  with StringGrid1 do
    begin
    ColCount := 18;
    Rowcount := 9;
    FixedCols := 0;
    FixedRows := 0;
    for r := 0 to High(PeriodenSysArray) do
      for c := 0 to High(PeriodenSysArray[0]) do
        Cells[c,r] := PeriodenSysArray[r,c];
    end;

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
marvin190 Threadstarter
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 55

Win XP, SuSe Linux 10.1
Delphi 3/5/2005 Personal; C++ Builder 6
BeitragVerfasst: Di 26.09.06 15:50 
Cool! Danke dann brauch ich das nicht mehr tippen ;-)

So hatte ich mir das auch vorgestellt, ist ja alles drin, Hauptgruppen, Nebengruppen Lanthanoide etc.

Vielen Dank!

_________________
Mfg Marvin
Carpe Diem! - Genieße den Tag! - [gr. Horaz]