AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

RadioGroup

Ein Thema von Joergie · begonnen am 8. Sep 2004 · letzter Beitrag vom 8. Sep 2004
Antwort Antwort
Joergie

Registriert seit: 31. Aug 2004
Ort: Philadelphia
21 Beiträge
 
#1

RadioGroup

  Alt 8. Sep 2004, 10:41
hat jmd ne Ahnung, wie ich die Elemente in einer RadioGroup sortieren kann? Gibt es da eine einfache methode.

RadioGroup.Items.Text.Sort

funktioniert leider nicht!

~joerg
"If you really want something in this life, you have to work for it.
Now, quiet! They're about to announce the lottery numbers..."
- Homer Simpson
  Mit Zitat antworten Zitat
Benutzerbild von Shaman
Shaman

Registriert seit: 2. Nov 2003
Ort: Schweiz
407 Beiträge
 
Turbo Delphi für Win32
 
#2

Re: RadioGroup

  Alt 8. Sep 2004, 10:50
Hoi

(RadioGroup.Items as TStringList).Sort; Gruss
Shaman
Daniel Pauli
Looking for answers from the great beyond
  Mit Zitat antworten Zitat
Benutzerbild von Grumble
Grumble

Registriert seit: 19. Mär 2003
Ort: Dresden
203 Beiträge
 
Delphi 6 Enterprise
 
#3

Re: RadioGroup

  Alt 8. Sep 2004, 10:53
ne idee:

1. du nimmst ne stringlist und haust da alle radiogroup.items.strings rein...
2. die liste laesste sortieren - list.sort
3. du loescht alle items in der radiogroup
4. du erzeugst neue items aus der liste - radiogroup.items.append ...
gruss
Grumble

... moege der code mit dir sein ...
  Mit Zitat antworten Zitat
Joergie

Registriert seit: 31. Aug 2004
Ort: Philadelphia
21 Beiträge
 
#4

Re: RadioGroup

  Alt 8. Sep 2004, 10:57
Zitat von Shaman:
Hoi

(RadioGroup.Items as TStringList).Sort;
Das funktioniert ganz gut. Jetzt möchte ich noch Zahlen (Integer) sortieren. zZ kommt die Sortierung:
10,15,5,6... raus, wobei es
5,6,10,15... .sein soll...

danke
~joerg
"If you really want something in this life, you have to work for it.
Now, quiet! They're about to announce the lottery numbers..."
- Homer Simpson
  Mit Zitat antworten Zitat
Benutzerbild von Sourcemaker
Sourcemaker

Registriert seit: 3. Sep 2003
Ort: Westoverledingen
264 Beiträge
 
Delphi 11 Alexandria
 
#5

Re: RadioGroup

  Alt 8. Sep 2004, 11:01
Hi Jörg,

hast du schon versucht die Zahlen mit Space (#32) links aufzufüllen ?

Gruß

Frank
Frank
  Mit Zitat antworten Zitat
Hansa

Registriert seit: 9. Jun 2002
Ort: Saarland
7.554 Beiträge
 
Delphi 8 Professional
 
#6

Re: RadioGroup

  Alt 8. Sep 2004, 11:02
Forme die Zahlen in Strings gleicher Länge um mit führenden blanks.
Gruß
Hansa
  Mit Zitat antworten Zitat
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#7

Re: RadioGroup

  Alt 8. Sep 2004, 11:04
Dann musst du dir selber eine Sortierung schreiben, die eben die Strings als ganze Zahle sortiert und nicht als Zeichenketten interpretiert.
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
Joergie

Registriert seit: 31. Aug 2004
Ort: Philadelphia
21 Beiträge
 
#8

Re: RadioGroup

  Alt 8. Sep 2004, 11:04
Hallo,
Zitat von Sourcemaker:
hast du schon versucht die Zahlen mit Space (#32) links aufzufüllen ?
Nein, das habe ich noch nicht versucht. habe gedacht, das es vielleicht so was wie
TStringList auch für Integer oder doublt gibt, habe ich aber leider noch nicht gefunden!

~joerg
"If you really want something in this life, you have to work for it.
Now, quiet! They're about to announce the lottery numbers..."
- Homer Simpson
  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 04:33 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