Autor Beitrag
GericasS
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 540

Windows Vista Home Premium
D2010, VisualStudio2008
BeitragVerfasst: Mi 24.09.08 14:44 
Morgen,

Ich brauche etwas wie Showmessage oder MeesageDlg, das auch Checkboxen anzeigen kann bzw. wenn diese dann gecheckt sind eine Aufgabe ausführt..Mit den beiden genannten habe ich es nicht geschaft. :wink: Ist vll. etwas unglücklich formuliert.

LG

GericasS


Moderiert von user profile iconNarses: Topic aus Sonstiges (Delphi) verschoben am Mi 24.09.2008 um 16:45

_________________
Alexander N.
Neue Bewaffnung Amilo xi2428 T9300
platzwart
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1054
Erhaltene Danke: 78

Win 7, Ubuntu 9.10
Delphi 2007 Pro, C++, Qt
BeitragVerfasst: Mi 24.09.08 14:59 
du könntest z.b. eine eigene form dazu verwenden.
GericasS Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 540

Windows Vista Home Premium
D2010, VisualStudio2008
BeitragVerfasst: Mi 24.09.08 15:02 
user profile iconplatzwart hat folgendes geschrieben:
du könntest z.b. eine eigene form dazu verwenden.


Oha sowas hab ich noch nicht gemacht, deswegen die Frage nach so einer Art MessageBox... :wink:

_________________
Alexander N.
Neue Bewaffnung Amilo xi2428 T9300
Marc.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1876
Erhaltene Danke: 129

Win 8.1, Xubuntu 15.10

BeitragVerfasst: Mi 24.09.08 15:05 
Warum bastelst Du Dir nicht Deinen eigenen Dialog? ;)
GericasS Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 540

Windows Vista Home Premium
D2010, VisualStudio2008
BeitragVerfasst: Mi 24.09.08 15:44 
user profile iconMarc. hat folgendes geschrieben:
Warum bastelst Du Dir nicht Deinen eigenen Dialog? ;)


Ich hab einen neue Form hinzugefügt. Auf dieser habe ich 2 Checkboxen ( String Grid und ListBox löschen ) und einen Button. Wenn ich diese nun mit den Löschbefehlen beschreibe dann passiert auf meiner Hauptform nichts ( logischer Weise ) da ja kein Kontakt zwischen den Objekten besteht. Wie erreiche ich das ? die Form2 hab ich bereits in die uses der Form1 aufgenommen..

_________________
Alexander N.
Neue Bewaffnung Amilo xi2428 T9300
Xentar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2077
Erhaltene Danke: 2

Win XP
Delphi 5 Ent., Delphi 2007 Prof
BeitragVerfasst: Mi 24.09.08 15:57 
Ich versteh die Frage nicht..

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm1.Abfrage;
begin
  Form2.ShowModal;
  if Form2.Checkbox1.Checked then
  begin
    //
  end;
end;

_________________
PROGRAMMER: A device for converting coffee into software.
GericasS Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 540

Windows Vista Home Premium
D2010, VisualStudio2008
BeitragVerfasst: Mi 24.09.08 16:01 
Also,

ich hab im Moment zwei Units mit jeweils einem Formular, das eine ist mein Hauptformular mit einem StringGrid etc etc. Auf der zweiten Form habe ich zwei Checkbox und ein Button wo ich auswählen kann von welchen Objekten der Hauptform ich den Inahlt löschen möchte ( StringGrid oder ListBox ). Meine Frage war nun wie ich von der zweiten Form auf die Objekte der Hauptform zugreifen kann bzw. auf das StringGrid ListBox um dessen Inhalt zu löschen.

EDIT : Okay ich habs verstanden

_________________
Alexander N.
Neue Bewaffnung Amilo xi2428 T9300
Hidden
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2242
Erhaltene Danke: 55

Win10
VS Code, Delphi 2010 Prof.
BeitragVerfasst: Mi 24.09.08 16:08 
Hi,

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
type
  TChoiceResults = (chCaseSensitive, chReplaceAll, chConfirmChanges);

function ShowChoiceBox: Set of TChoiceResults;
var
  aForm: TChoiceBox;
begin
  result := [];
  aForm := TChoiceBox.Create;
  try
    aForm.ShowModal;
    if aForm.CheckBox1.Checked then
      result := result + [chCaseSensitive];
    {..}
  finally
    aForm.Free;
  end;
end;


Kannst ja generell mal überlegen, ob du nicht 'ne CheckListBox(heißt das glaub' ich) nimmst und dann als Parameter 'nen String, in dem die Beschriftungen stehen(mit bestimmtem Zeichen als Trennzeichen).

Als Rückgabewert dann ein Set of 0..255, welche Checkboxen gecheckt sind.

ausblenden Delphi-Quelltext
1:
Case ShowChoiceBox('Case Sensitive!Replace all!Confirm Changes', '!') of					


PS: Na toll: Will ich gerad' auf abschicken drücken und dann so 'was :tongue: ist ja noch schöner als "E: Mist, zu spät!"^^

E: Aso, das mit dem Case of geht dann nicht mehr, der Rückgabewert war zuerst 'n Integer. Musst du dann in Variable Speichern und einzeln mit "if .. in ChoiceResults then .." prüfen.

mfG,

_________________
Centaur spears can block many spells, but no one tries to block if they see that the spell is a certain shade of green. For this purpose it is useful to know some green stunning hexes. (HPMoR)
GericasS Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 540

Windows Vista Home Premium
D2010, VisualStudio2008
BeitragVerfasst: Mi 24.09.08 16:11 
Sry aber trotzdem vielen Dank für diese ausführliche Information werde es mir durchlesen kann ja nur noch das Verständnis fördern =)

LG

GericasS

_________________
Alexander N.
Neue Bewaffnung Amilo xi2428 T9300