Results 1 to 4 of 4

Thread: Hoe kan het er zo slecht uitzien bij een TListView?

  1. #1

    Hoe kan het er zo slecht uitzien bij een TListView?

    Ik gebruik Delphi 10.1 (Berlin) en op sommige computers ziet een TListView er heel anders (en verkeerd) uit, terwijl dat bij mij goed is.

    Verkeerd (vreemde computer):
    Click image for larger version. 

Name:	Saveas.jpg 
Views:	86 
Size:	93.2 KB 
ID:	8241

    Zoals je kunt zien is alles vertikaal op mekaar geplakt en bedekt het blauwe vensterje 2 items.

    Goed (mijn computer):
    Click image for larger version. 

Name:	SaveAs2.jpg 
Views:	76 
Size:	84.3 KB 
ID:	8242

    Ik denk dat het iets is met de Windows instellingen op beide machines. Voor zover we kunnen zien echter zijn er geen verschillen (we gebruiken allebei Windows7 en ook hetzelfde type scherm).
    Iemand enig idee?

    Additioneel: iemand enig idee hoe ik de tekst vertikaal kan centreren in een item?


    Alvast bedankt!

    Dit is de code:
    Code:
    // This file is part of Subtitle Workshop
    // URL: subworkshop.sf.net
    // Licesne: GPL v3
    // Copyright: See Subtitle Workshop's copyright information
    // File Description: Save As form
    
    unit formSaveAs;
    
    interface
    
    uses
      Windows,
      Messages,
      SysUtils,
      Classes,
      Graphics,
      Controls,
      Forms,
      StdCtrls,
      Dialogs,
      ImgList,
      ComCtrls,
      IniFiles,
      FastStrings,
      System.ImageList,
      USubTitleAPI,
      Scale, // Kameleon
      VideoPreview; // Kameleon
    
    // -----------------------------------------------------------------------------
    
    type
      TfrmSaveAs = class(TForm)
        chkAllFormats: TCheckBox;
        lstFormats: TListView;
        lblDblClick: TLabel;
        dlgSave: TSaveDialog;
        btnCustomFormat: TButton;
        btnCancel: TButton;
        ImageList: TImageList;
        chkUTF8: TCheckBox;
        procedure FormCreate(Sender: TObject);
        procedure chkAllFormatsClick(Sender: TObject);
        procedure lstFormatsDblClick(Sender: TObject);
        procedure lstFormatsKeyDown(Sender: TObject; var Key: Word;
          Shift: TShiftState);
        procedure btnCustomFormatClick(Sender: TObject);
        procedure FormDestroy(Sender: TObject);
        procedure FormShow(Sender: TObject);
        procedure FormResize(Sender: TObject); //added by adenry
      private
        Resize_Enabled: boolean;
        procedure AddCustomFormats;
        procedure SetLanguage;
      public
        SaveTranslation: Boolean;
      end;
    
    // -----------------------------------------------------------------------------
    
    var
      frmSaveAs: TfrmSaveAs;
    
    implementation
    
    uses
      General,
      Functions,
      TreeViewHandle,
      Undo, //USubtitlesFunctions, USubtitleAPI, //Undo added by adenry //USubtitlesFunctions, USubtitleAPI removed by adenry
      formMain,
      formCustomFormats,
      formOutputSettings;
    
    {$R *.dfm}
    
    // -----------------------------------------------------------------------------
    
    procedure TfrmSaveAs.SetLanguage;
    var
      LF: TIniFile;
      CP: integer;
    begin
      CP := CharsetToCodePage(frmMain.Font.Charset); // Kameleon
    
      LF := TIniFile.Create(frmMain.ActualLangFile);
      try
        with LF do
        begin
          Caption := StringToWideStringCP(ReadString('Save as', '01', 'Save as'), CP);
          lblDblClick.Caption := StringToWideStringCP(ReadString('Save as', '02', 'Double-click on the output format:'), CP);
          btnCustomFormat.Caption := StringToWideStringCP(ReadString('Save as', '03', 'Custom format'), CP);
          chkAllFormats.Caption := StringToWideStringCP(ReadString('Save as', '04', 'All formats'), CP);
          btnCancel.Caption := BTN_CANCEL;
    
          // ------------------ //
          //      Set font      //
          // ------------------ //
          Font := frmMain.Font;
        end;
      finally
        LF.Free;
      end;
    end;
    
    // -----------------------------------------------------------------------------
    
    procedure TfrmSaveAs.AddCustomFormats;
    var
      Busca: TSearchRec;
      i: Integer;
      A: TListItem;
    begin
      i := FindFirst(ExtractFilePath(Application.ExeName) + ID_CFPDIR + '\*.cfp', faAnyFile, Busca);
      while i = 0 do
      begin
        A := lstFormats.Items.Add;
        A.Caption := Copy(Busca.Name, 1, LastDelimiter('.', Busca.Name) - 1);
        A.StateIndex := 1;
        i := FindNext(Busca);
      end;
      FindClose(Busca);
    end;
    
    // -----------------------------------------------------------------------------
    
    procedure TfrmSaveAs.FormCreate(Sender: TObject);
    var
      i: Integer;
      TotalFormats: Integer;
      Name, Ext: string;
      Item: TListItem;
      Ini: TIniFile;
    begin
      // Kameleon
      Resize_Enabled := false;
      Resize_Enabled := true;
      // Kameleon
    
      //frmSaveAsExecuting := True;   // removed by BDZL
      frmMain.frmSaveAsExecuting := True; //added by adenry. Another option is frmMain.tmrSaveWork.Enabled:=False;
      SetLanguage;
      SaveTranslation := False;
      TotalFormats := SubtitleApi.FormatsCount;
      if TotalFormats = 0 then Exit;
      lstFormats.Clear;
    
      //added by adenry: end
      Ini := TIniFile.Create(IniRoot);
      try
        for i := 1 to TotalFormats do
        begin
          SubtitleAPI.GetFormatInfo(i, Name, Ext);
          if Ini.ReadBool('Formats to show', SubtitleAPI.GetFormatName(i), True) = True then
          begin
            Item := lstFormats.Items.Add;
            Item.Caption := Name;
            Item.ImageIndex := 0;
            Item.StateIndex := 0;
          end;
        end;
        if Ini.ReadBool('Formats', 'Show custom formats', False) then AddCustomFormats;
      finally
        Ini.Free;
      end;
    end;
    
    // -----------------------------------------------------------------------------
    
    procedure TfrmSaveAs.chkAllFormatsClick(Sender: TObject);
    var
      i: Integer;
      TotalFormats: Integer;
      Name, Ext: string;
      Item: TListItem;
      Ini: TIniFile;
    begin
      TotalFormats := SubtitleAPI.FormatsCount;
      if TotalFormats = 0 then Exit;
      lstFormats.Clear;
    
      Ini := TIniFile.Create(IniRoot);
      for i := 1 to TotalFormats do
      begin
        SubtitleAPI.GetFormatInfo(i, Name, Ext);
        if chkAllFormats.Checked then
        begin
          Item := lstFormats.Items.Add;
          Item.Caption := Name;
          Item.ImageIndex := 0;
          Item.StateIndex := 0;
        end else
        begin
          if Ini.ReadBool('Formats to show', SubtitleAPI.GetFormatName(i), True) = True then
          begin
            Item := lstFormats.Items.Add;
            Item.Caption := Name;
            Item.ImageIndex := 0;
            Item.StateIndex := 0;
          end;
        end;
      end;
    
      if Ini.ReadBool('Formats', 'Show custom formats', False) then AddCustomFormats;
    
      Ini.Free;
    end;
    
    // -----------------------------------------------------------------------------
    
    procedure TfrmSaveAs.lstFormatsDblClick(Sender: TObject);
    label
      SaveSubFile;
    label
      SaveCustFile;
    var
      FormatName: string;
      AllExts: string;
      Ext: string;
      SubFile: string;
      SubFormat: Integer;
      // Custom formats stuff
      // FormatName
      // Ext
      NewLineChar: string;
      TimeStructure: string;
      Time, Frames: Boolean;
      FPS: Single;
      Lines: TStrings;
      i: Byte;
      //Ini: TIniFile;
    
    begin
      if ChkUTF8.Checked then SubTitleAPI.Set_UTF8_File(true)
      else SubTitleAPI.Set_UTF8_File(false);
    
      chkUTF8.Checked := SubtitleAPI.Get_UTF8_File;
    
      if lstFormats.ItemIndex = -1 then exit;
      UpdateArray(SubtitleAPI.GetFormatIndex(lstFormats.Items[lstFormats.ItemIndex].Caption), SaveTranslation); //format index added by adenry
    
      // Regular Formats (non-custom)
      if lstFormats.Items[lstFormats.ItemIndex].StateIndex = 0 then
      begin
        SubFormat := SubtitleAPI.GetFormatIndex(lstFormats.Items[lstFormats.ItemIndex].Caption);
        SubtitleAPI.GetFormatInfo(SubFormat, FormatName, AllExts);
        dlgSave.Filter := FormatName + ' (' + AllExts + ')|' + AllExts;
    
        if SaveTranslation then
          SubFile := Copy(frmMain.TransFile, 1, LastDelimiter('.', frmMain.TransFile)) else
          SubFile := Copy(frmMain.OrgFile, 1, LastDelimiter('.', frmMain.OrgFile) - 1);
        if SubFile = '' then SubFile := lstFormats.Items[lstFormats.ItemIndex].Caption;
        Ext := GetFormatExt(SubFormat);
        if ExtractFileExt(SubFile) <> Ext then SubFile := SubFile + Ext;
    
        dlgSave.FileName := SubFile;
    
        if (dlgSave.Execute) and (dlgSave.FileName <> '') then
        begin
          SubFile := dlgSave.FileName;
    
          if AnsiLowerCase(ExtractFileExt(SubFile)) <> AnsiLowerCase(Ext) then
          begin
            if SmartPos(ExtractFileExt(SubFile), AllExts, False) = 0 then
              SubFile := SubFile + Ext;
          end;
          if FileExists(SubFile) then
          begin
            case MsgBox(Format(QuestionMsg[02], [SubFile]), BTN_YES, BTN_NO, BTN_CANCEL, MB_ICONQUESTION, frmSaveAs) of
              1: goto SaveSubFile;
              2:
                begin
                  SubtitleAPI.ClearSubtitles;
                  Close;
                  exit;
                end; //SubtitleAPI.ClearSubtitles added by adenry
              3:
                begin
                  SubtitleAPI.ClearSubtitles;
                  exit;
                end; //SubtitleAPI.ClearSubtitles added by adenry
            end;
          end;
    
          SaveSubFile:
          //added by adenry: begin
          //show Output Settings window if necessary
          for i := 0 to Length(frmMain.OutputSettingsFormats) - 1 do
            if FormatName = frmMain.OutputSettingsFormats[i].FormatName then
            begin
              if frmMain.OutputSettingsFormats[i].AlwaysShow = TRUE then
              begin
                frmOutputSettings := TfrmOutputSettings.Create(Application);
                with frmOutputSettings do
                begin
                  pgeFormats.ActivePage := pgeFormats.Pages[i];
                  pgeFormats.ActivePageIndex := i;
                  pnlHeading.Caption := tvFormats.Items[i].Text;
                  tvFormats.Visible := False;
                  pnlHeading.Left := tvFormats.Left;
                  pgeFormats.Left := tvFormats.Left; // - pgeFormats.Pages[0].Left;
                  //pgeFormats.Width := pgeFormats.Width + pgeFormats.Pages[0].Left;
                  //bvlSeparate1.Left := bvlSeparate1.Left + pgeFormats.Pages[0].Left;
                  //bvlSeparate1.Width := bvlSeparate1.Width - pgeFormats.Pages[0].Left;
                  btnOk.Left := btnOk.Left - tvFormats.Width - tvFormats.Left;
                  btnCancel.Left := btnCancel.Left - tvFormats.Width - tvFormats.Left;
                  ClientWidth := ClientWidth - tvFormats.Width - tvFormats.Left;
                end;
                if frmOutputSettings.ShowModal <> mrOk then
                begin
                  SubtitleAPI.ClearSubtitles;
                  frmOutputSettings.Free;
                  //Close;
                  exit;
                end;
                frmOutputSettings.Free;
              end;
              break;
            end;
          //added by adenry: end
    
          if SaveFile(SubFile, SubFormat, GetFPS) = False then
          begin
            SubtitleAPI.ClearSubtitles; //added by adenry
            Close;
            exit;
          end;
    
          //Save successful!
          if SaveTranslation then
          begin
            frmMain.TransFile := SubFile;
            frmMain.TransFormat := SubFormat;
            frmMain.TransModified := False;
            frmMain.UndoNumWhenTransSaved := UndoList.Count; //added by adenry
          end else
          begin
            frmMain.OrgFile := SubFile;
            frmMain.OrgFormat := SubFormat;
            frmMain.OrgModified := False;
            frmMain.UndoNumWhenOrgSaved := UndoList.Count; //added by adenry
          end;
          frmMain.RefreshStatusbar; //added by adenry - refresh format name in statusbar
    
          if (frmMain.MarkingSave = 2) and (frmMain.MarkingModified) then SaveMarking(SubFile + ID_SRFEXT, SubFile); //added by adenry
    
          SetFormCaption;
    
          frmMain.AddToRecent(SubFile);
    
          if FileExists(SubFile + '.ini') then DeleteFile(SubFile + '.ini'); // Kameleon
    
          if frmMain.btnPlay.Enabled
            then AddToLastChoices(SubFile, GetCurrentPos, frmMain.lstSubtitles.FocusedNode.Index, GetCurrentAudioStream, frmMain.MovieFile, LastPositions)
          else AddToLastChoices(SubFile, -1, frmMain.lstSubtitles.FocusedNode.Index, GetCurrentAudioStream, '', LastPositions);
          Close;
        end;
      end else
    
      // Custom Format
        if lstFormats.Items[lstFormats.ItemIndex].StateIndex = 1 then
        begin
          Lines := TStringList.Create;
          try
            GetCustomFormatInfo(ExtractFilePath(Application.ExeName) + ID_CFPDIR + '\' + lstFormats.Items[lstFormats.ItemIndex].Caption + '.cfp', FormatName, Ext, NewLineChar, TimeStructure, Time, Frames, FPS, Lines);
            Ext := Copy(Ext, 2, Length(Ext));
            if SaveTranslation then
              SubFile := Copy(frmMain.TransFile, 1, LastDelimiter('.', frmMain.TransFile)) else
              SubFile := Copy(frmMain.OrgFile, 1, LastDelimiter('.', frmMain.OrgFile) - 1);
            if ExtractFileExt(SubFile) = '' then
              SubFile := SubFile + Ext;
    
            dlgSave.Filter := FormatName + ' (' + Ext + ')|' + Ext;
            dlgSave.FileName := SubFile;
    
            if (dlgSave.Execute) and (dlgSave.FileName <> '') then
            begin
              SubFile := dlgSave.FileName;
              if ExtractFileExt(SubFile) = '' then
                SubFile := SubFile + Ext;
              if FileExists(SubFile) then
              begin
                case MsgBox(Format(QuestionMsg[02], [SubFile]), BTN_YES, BTN_NO, BTN_CANCEL, MB_ICONQUESTION, frmSaveAs) of
                  1: goto SaveCustFile;
                  2:
                    begin
                      SubtitleAPI.ClearSubtitles;
                      Close;
                      exit;
                    end; //SubtitleAPI.ClearSubtitles added by adenry
                  3:
                    begin
                      SubtitleAPI.ClearSubtitles;
                      exit;
                    end; //SubtitleAPI.ClearSubtitles added by adenry
                end;
              end;
              SaveCustFile:
              SaveCustomFormat(SubFile, Lines, Time, Frames, TimeStructure, FPS, NewLineChar, chkUTF8.Checked);
    
              if FileExists(SubFile + '.ini') then DeleteFile(SubFile + '.ini'); // Kameleon
    
              if frmMain.btnPlay.Enabled
                then AddToLastChoices(SubFile, GetCurrentPos, frmMain.lstSubtitles.FocusedNode.Index, GetCurrentAudioStream, frmMain.MovieFile, LastPositions)
              else AddToLastChoices(SubFile, -1, frmMain.lstSubtitles.FocusedNode.Index, GetCurrentAudioStream, '', LastPositions);
    
            end;
          finally
            Lines.Clear;
          end;
        end;
      SubtitleAPI.ClearSubtitles;
    end;
    
    // -----------------------------------------------------------------------------
    
    procedure TfrmSaveAs.lstFormatsKeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
    begin
      if Key = VK_RETURN then
        lstFormatsDblClick(Sender);
    end;
    
    // -----------------------------------------------------------------------------
    
    procedure TfrmSaveAs.btnCustomFormatClick(Sender: TObject);
    begin
      frmCustomFormats := TfrmCustomFormats.Create(Application);
      frmCustomFormats.SaveTranslation := SaveTranslation;
      frmCustomFormats.ShowModal;
      frmCustomFormats.Free;
    end;
    
    // -----------------------------------------------------------------------------
    
    procedure TfrmSaveAs.FormDestroy(Sender: TObject);
    var
      Ini: TIniFile; //added by adenry
    begin
      //frmSaveAsExecuting := False;  // removed by BDZL
      //added by adenry: begin
      Ini := TIniFile.Create(IniRoot);
    
      if WindowState = wsMaximized then
      begin
        Ini.WriteBool('Save', 'Maximized', True);
      end
      else
      begin
        Ini.WriteInteger('Save', 'Left', Left);
        Ini.WriteInteger('Save', 'Top', Top);
        Ini.WriteInteger('Save', 'Width', Width);
        Ini.WriteInteger('Save', 'Height', Height);
        Ini.WriteBool('Save', 'Maximized', False);
      end;
      Ini.WriteBool('Save', 'UTF8', chkUTF8.Checked); // Kameleon
      Ini.Free;
    
      frmMain.frmSaveAsExecuting := False; //added by adenry. another option is frmMain.tmrSaveWork.Enabled:=True;
      //added by adenry: end
    end;
    
    // -----------------------------------------------------------------------------
    
    //added by adenry: begin
    
    procedure TfrmSaveAs.FormResize(Sender: TObject);
    begin
      if Resize_Enabled then
      begin
        btnCustomFormat.Top := ClientHeight - 8 - btnCustomFormat.Height;
        btnCancel.Top := btnCustomFormat.Top;
        btnCancel.Left := ClientWidth - 8 - btnCancel.Width;
    
        chkAllFormats.Top := btnCustomFormat.Top - 8 - chkAllFormats.Height;
        chkAllFormats.Width := ClientWidth - 16;
    
        chkUTF8.Top := chkAllFormats.Top; // Kameleon
        chkUTF8.Left := btnCancel.Left; // Kameleon
    
        lstformats.Top := lbldblClick.Top + lbldblclick.height + 5; // Kameleon
        lstFormats.Width := ClientWidth - 16;
        lstFormats.Height := chkAllFormats.Top - 8 - lstFormats.Top;
    
        chkAllFormatsClick(Sender);
      end;
    end;
    
    procedure TfrmSaveAs.FormShow(Sender: TObject);
    var
      i: integer;
      MaxW, MaxH, Tmp: word;
      Ini: TIniFile;
      W, H, L, T: integer;
    begin
      MaxW := 0;
      //MaxH := 0;
      LstFormats.Canvas.Font.Size := font.Size;
      for I := 0 to LstFormats.Items.Count - 1 do
      begin
        Tmp := LstFormats.Canvas.TextWidth(LstFormats.Items[I].Caption);
        if Tmp > MaxW then MaxW := Tmp;
        //Tmp := LstFormats.Canvas.TextHeight(LstFormats.Items[I].Caption);
        //if Tmp > MaxH then MaxH := Tmp;
      end;
    
      if MaxW = 0 then MaxW := (ClientWidth div 4) - 10;
      MaxW := MaxW * 13 div 10; // to give space (130%)
      LstFormats.LargeImages.Width := MaxW;
      //if MaxH > 0 then LstFormats.LargeImages.Height := MaxH;
    
      Ini := TIniFile.Create(IniRoot);
      W := abs(Ini.ReadInteger('Save', 'Width', Screen.Width div 2));
      H := abs(Ini.ReadInteger('Save', 'Height', Screen.Height div 2));
      L := abs(Ini.ReadInteger('Save', 'Left', Screen.Width div 4));
      T := abs(Ini.ReadInteger('Save', 'Top', Screen.Height div 4));
    
      SetLimitedBounds(Self, L, T, W, H);
    
      if Ini.ReadBool('Save', 'Maximized', False)
        then WindowState := wsMaximized
      else WindowState := wsNormal;
    
      chkUTF8.Checked := Ini.ReadBool('Save', 'UTF8', true);
    
      Ini.Free;
    end;
    
    //added by adenry: end
    
    // -----------------------------------------------------------------------------
    
    end.
    Code:
    object frmSaveAs: TfrmSaveAs
      Left = 283
      Top = 561
      BorderIcons = [biSystemMenu, biMaximize]
      Caption = 'frmSaveAs'
      ClientHeight = 333
      ClientWidth = 504
      Color = clBtnFace
      Constraints.MinHeight = 250
      Constraints.MinWidth = 300
      Font.Charset = ANSI_CHARSET
      Font.Color = clWindowText
      Font.Height = -17
      Font.Name = 'Tahoma'
      Font.Style = []
      OldCreateOrder = False
      Position = poDesigned
      Scaled = False
      OnCreate = FormCreate
      OnDestroy = FormDestroy
      OnResize = FormResize
      OnShow = FormShow
      DesignSize = (
        504
        333)
      PixelsPerInch = 96
      TextHeight = 21
      object lblDblClick: TLabel
        Left = 12
        Top = 12
        Width = 255
        Height = 21
        Margins.Left = 5
        Margins.Top = 5
        Margins.Right = 5
        Margins.Bottom = 5
        Caption = 'Double-click on the output format:'
      end
      object chkAllFormats: TCheckBox
        Left = 12
        Top = 227
        Width = 157
        Height = 25
        Margins.Left = 5
        Margins.Top = 5
        Margins.Right = 5
        Margins.Bottom = 5
        Caption = 'All formats'
        TabOrder = 1
        OnClick = chkAllFormatsClick
      end
      object lstFormats: TListView
        Left = 10
        Top = 43
        Width = 485
        Height = 174
        Margins.Left = 5
        Margins.Top = 5
        Margins.Right = 5
        Margins.Bottom = 5
        Columns = <>
        HideSelection = False
        LargeImages = ImageList
        ReadOnly = True
        ShowColumnHeaders = False
        SortType = stText
        TabOrder = 0
        OnDblClick = lstFormatsDblClick
        OnKeyDown = lstFormatsKeyDown
      end
      object btnCustomFormat: TButton
        Left = 12
        Top = 270
        Width = 338
        Height = 38
        Margins.Left = 5
        Margins.Top = 5
        Margins.Right = 5
        Margins.Bottom = 5
        Caption = 'Custom format'
        TabOrder = 2
        OnClick = btnCustomFormatClick
      end
      object btnCancel: TButton
        Left = 372
        Top = 270
        Width = 122
        Height = 38
        Margins.Left = 5
        Margins.Top = 5
        Margins.Right = 5
        Margins.Bottom = 5
        Cancel = True
        Caption = '&Cancel'
        ModalResult = 2
        TabOrder = 3
      end
      object chkUTF8: TCheckBox
        Left = 370
        Top = 227
        Width = 124
        Height = 25
        Margins.Left = 5
        Margins.Top = 5
        Margins.Right = 5
        Margins.Bottom = 5
        Anchors = [akTop, akRight]
        Caption = 'UTF-8'
        TabOrder = 4
      end
      object dlgSave: TSaveDialog
        Options = [ofHideReadOnly, ofPathMustExist, ofEnableSizing]
        Left = 160
        Top = 64
      end
      object ImageList: TImageList
        Left = 96
        Top = 64
        Bitmap = {
          494C0101010004006C0010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
          0000000000003600000028000000400000001000000001002000000000000010
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          000000000000000000000000000000000000000000008C5A52008C5A52008452
          4A0084524A0084524A0084524A0084524A0084524A0084524A0084524A008452
          4A0084524A00844A4200735A5200000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          00000000000000000000000000000000000000000000FFE7CE00FFDEC600FFDE
          C600FFDEC600FFDEC600FFDEBD00FFD6BD00FFD6B500FFD6B500FFD6B500FFD6
          AD00FFD6AD00FFCEAD00735A5200000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          00000000000000000000000000000000000000000000FFE7CE00FFE7CE00FFDE
          C600FFDEC600FFDEC600FFDEC600FFDEBD00FFDEBD00FFD6B500FFD6B500FFD6
          B500FFD6B500FFD6AD00735A5200000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          00000000000000000000000000000000000000000000FFE7D600FFE7CE00FFE7
          CE00FFE7CE00FFE7CE00FFDEC600FFDEC600FFDEBD00FFDEBD00FFD6BD00FFD6
          B500FFD6B500FFD6B500735A5200000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          00000000000000000000000000000000000000000000FFEFD600FFE7D600FFE7
          D600FFE7D600FFE7CE00FFE7CE00FFDEC600FFDEC600FFDEC600FFDEBD00FFD6
          BD00FFD6BD00FFD6B500735A5200000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          00000000000000000000000000000000000000000000FFEFDE00FFEFD600FFE7
          D600FFE7D600FFE7D600FFE7CE00FFE7CE00FFDEC600FFDEC600FFDEC600FFDE
          BD00FFDEBD00FFDEBD00735A5200000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          00000000000000000000000000000000000000000000FFEFDE00FFEFDE00FFEF
          DE00FFEFDE00FFE7D600FFE7D600FFE7CE00FFE7CE00FFE7CE00FFDEC600FFDE
          C600FFDEC600FFDEBD00735A5200000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          00000000000000000000000000000000000000000000FFF7E700FFEFE700FFEF
          E700FFEFE700FFEFDE00FFEFDE00FFEFD600FFE7D600FFE7D600FFE7CE00FFE7
          CE00FFE7CE00FFDEC600735A5200000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          00000000000000000000000000000000000000000000FFF7EF00FFF7E700FFF7
          E700FFF7E700FFEFE700FFEFDE00FFEFDE00FFEFDE00FFE7D600FFE7D600FFE7
          CE00FFE7CE00FFE7CE00735A5200000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          00000000000000000000000000000000000000000000FFF7EF00FFF7EF00FFF7
          EF00FFF7EF00FFF7E700FFEFE700FFEFDE00FFEFDE00FFEFDE00FFE7D600FFE7
          D600FFE7D600FFE7CE00735A5200000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          00000000000000000000000000000000000000000000FFFFF700FFF7F700FFF7
          EF00FFF7EF00FFF7EF00FFF7E700FFEFE700FFEFE700FFEFDE00FFEFDE00FFEF
          D600FFEFD600FFE7D600735A5200000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          00000000000000000000000000000000000000000000FFFFF700FFFFF700FFF7
          F700FFF7F700FFF7EF00FFF7EF00FFF7EF00FFF7E700FFEFE700BD948C00B58C
          8400B58C8400B5848400735A5200000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
          F700FFFFF700FFF7F700FFF7EF00FFF7EF00FFF7EF00FFF7E700AD7B6300FFB5
          4A00FFB54A00735A520000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
          FF00FFFFFF00FFFFF700FFFFF700FFF7F700FFF7EF00FFF7EF00B5846B00735A
          5200735A52000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          000000000000000000000000000000000000424D3E000000000000003E000000
          2800000040000000100000000100010000000000800000000000000000000000
          000000000000000000000000FFFFFF00FFFF0000000000008001000000000000
          8001000000000000800100000000000080010000000000008001000000000000
          8001000000000000800100000000000080010000000000008001000000000000
          8001000000000000800100000000000080010000000000008003000000000000
          8007000000000000FFFF00000000000000000000000000000000000000000000
          000000000000}
      end
    end
    Last edited by Dany; 20-Jul-22 at 18:07.
    Vriendelijke groeten,
    Dany

  2. #2
    Een listview heeft verschillende instellingen, beetjes zoals de verschilldende weergaven in de verkenner. Misschien heeft het daar wat mee te maken?
    Sowieso, die gecentreerde items, dat zie je normaal toch alleen als je er ook een plaatje bij hebt?
    1+1=b

  3. #3
    Bij de eerste image lijkt de scherm instelling ook niet op 96 DPI te staan.

    Tevens doe je dit in FormCreate
    LstFormats.LargeImages.Width := MaxW;

    Het zou kunnen zijn dat bij jou de MaxW hetzelfde is als de reeds bestaande.
    Wanneer deze echter afwijkt van wat ie nu is (16) dan wordt volgens mij de hele lijst gecleart.
    Met als gevolg dat er geen icoon meer aanhangt (of die nu wel of niet getoond wordt) en de lijst meer condensed zal zijn.

    Het lijkt mij ook een beetje misbruik maken van de LargeImages van TListView.

    Probeer het maar eens. Nu staat er in designtime een icoon in en staat de Width op 16.
    Maak de Width van ImageList eens 32.
    Dan zie je in een keer dat je geen icoon meer hebt in die ImageList.

    Dus eigenlijk moet je daarna weer dynamisch de ImageList vullen met een icoon van de gewenste breedte.

  4. #4
    mov rax,marcov; push rax marcov's Avatar
    Join Date
    Apr 2004
    Location
    Ehv, Nl
    Posts
    10,357
    (een kleine blik op de entry in de DFM kan soms wonderen doen om te raden welke properties niet op hun default staan)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •