Jump to content

haentschman

Members
  • Content Count

    211
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by haentschman


  1. Hi...

    Quote

    INPUT dialogs

    I have not needed it yet. But..." scalable...dialog with every controls you want (inheritance)" :classic_cool:

     

    ...you must programming it by yourself. :classic_happy:

     

    You must have:

    1. A base (form) dialog, where the others inherited from. This form encapsulates the logic for the Buttons, Colors, Parent.

    2. A new one inherited from the base.

    3. design your dialog with treeview, checkboxes, edits, animations...

    4. programming the logic for your controls

    5. overload the class function with your new dialog

     

    ...in saxony (Germany) we say "Fertsch" (like finish) :classic_cool:

     

     


  2. Hi...:classic_cool:

    Quote

    MessageDlg show the dialog in the center of the SCREEN

    ...you programming a own MessageDialog. :classic_tongue:

     

    MessageDlg.thumb.png.a892504d1f612b699d8c032f9aa169f7.png

     

    TOwnMessageDialog = class
      strict private
        // own formular
        class function ShowMessage(MessageCaption: string; MsgType: TMsgDlgType; Buttons: TMsgDlgButtons; MessageLines: TStrings; Help: LongInt = 0; MessageColor: Integer = clBlack; Parent: TForm = nil): Integer;
      public
        constructor Create;
        destructor Destroy; override;
        class function MessageDlg(MessageText: string; MsgType: TMsgDlgType; Buttons: TMsgDlgButtons; Help: LongInt = 0; MessageColor: Integer = clBlack; Parent: TForm = nil): Integer; overload; // wie MessageDialog Original
        class function MessageDlg(MessageText: string; MessageHeader: string; MsgType: TMsgDlgType; Buttons: TMsgDlgButtons; MessageColor: Integer = clBlack; Parent: TForm = nil): Integer; overload;
        class function MessageDlg(MessageLines: TStrings; MessageHeader: string; MsgType: TMsgDlgType; Buttons: TMsgDlgButtons; MessageColor: Integer = clBlack; Parent: TForm = nil): Integer; overload;
        class function MessageDlg(E: EDatabaseError; MessageHeader: string; MsgType: TMsgDlgType; Buttons: TMsgDlgButtons; MessageColor: Integer = clBlack; Parent: TForm = nil): Integer; overload;
      end;

    Advantages:

    1. own formular with corporate design

    2. Parent for the message

    3. own high (Count of MessageLines)

    4. own with (longest text in MessageLines)

    5. own Colors (Text)

    6. scalable...dialog with every controls you want (inheritance)

    ...and so on. :classic_wink:

     

     

    • Like 1

  3. Hi all...:classic_cool:

    Quote

    You should think twice before using TMEMO as a list handler 

    :classic_cheerleader:

     

    Proposal:

     

    1. create a TStringList as a private variable

    2. read the *.txt file into a TStringlist  http://docwiki.embarcadero.com/Libraries/Seattle/en/System.Classes.TStrings.LoadFromFile

    List.LoadFromFile

    3. show the content of the *.txt File in the MEMO

    Memo.Text := List.Text

     

    4. iterate through the lines of the List if you want to Work with the data

    for I := 0 to List.Count - 1 do
    begin
      // your work
    end;

    5. if you change the data in the list, reload the MEMO

    Memo.Text := List.Text

     

    ...finish. :classic_cool:

     

    :classic_blink: German names? If you  search the german DP ... https://www.delphipraxis.net

×