CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

DXE2+14.0.32+2.1.0.3701 - Vertical Scroll bar missing

by ScottWGast » 26 Jun 2014 17:25

Good morning!

I have tab containing a region. I use this code to add TIWCGJQMenu components to the region, but a vertical scroll bar does not appear when the region is filled.

Basically, the code adds TIWCGJQMenu components that have two TIWCGJQMenuItem components allowing the user to Open or Delete the file selected.

The region properties I think might affect whether or not the VerticalScrollBar is shown:
.Align = alClient;
.ClipRegion = True;
.VerticalScrollBar.Visible := True;

Code: Select all
procedure TframeCaseFile.LoadCaseFileLinkedDocuments;
var
  strFolder, strFilename, strCaption: String;
  slLinkedDocuments: TStringList;
  itemLinkedDocument: TIWCGJQMenu;
  itemDocument: TIWCGJQMenuItem;
  itemSubMenu: TIWCGJQMenuItem;
  i: Integer;
begin

  strFolder := UserSession.GetCaseFileLinkedDocumentsFolder(Self.FCaseFileNumber);

  Self.fileUploadLinkedDocument.JQFileUploadOptions.UploadPath := strFolder;
  Self.fileUploadLinkedDocument.JQFileUploadOptions.OnUpload.Indicator := Self.FLockIndicator;

  ForceDirectories(strFolder);

  slLinkedDocuments := TStringList.Create;
  S2Snax.GetFileList(strFolder, True, '*.*', slLinkedDocuments);

  Self.KillLinkedDocumentsList;

  for i := 0 to slLinkedDocuments.Count - 1 do
    begin
      itemLinkedDocument := TIWCGJQMenu.Create(Self);
      itemLInkedDocument.Parent := Self.regionLinkedDocuments;
      itemLinkedDocument.Name := FindUniqueName;
      itemLinkedDocument.Align := TAlign.alTop;

      strFilename := slLinkedDocuments[i];
      strCaption := '<html>' +
                        '<body>' +
                          '<div id="container" style="width:' + IntToStr(Self.regionLinkedDocuments.Width) + 'px">' +
                            '<div id="col1" style="width:'+IntToStr(Self.regionLinkedDocuments.Width div 2)+'px;float:left;">' +
                              ExtractFileName(strFilename) + '<br>' +
                            '</div>' +
                            '<div id="col2" style="width:'+IntToStr(Self.regionLinkedDocuments.Width div 4)+'px;float:left;">' +
                              FormatDateTime('MM/DD/YYYY HH:MM:SS AM/PM', S2Snax.GetFileDate(strFilename)) + '<br>' +
                            '</div>' +
                            '<div id="col3" style="width:'+IntToStr(Self.regionLinkedDocuments.Width div 4)+'px;float:left;">' +
                              S2Snax.RealToString(RoundTo(S2Snax.GetFileSize(strFilename) / 1024,-2)) + ' KB' + '<br>' +
                            '</div>' +
                          '</div>' +
                        '</body>' +
                      '</html>';


      itemDocument := itemLInkedDocument.MenuItems.Add;
      itemDocument.Caption := strCaption;
      itemSubMenu := itemDocument.SubItems.Add;
      itemSubMenu.Caption := 'Open ' + ExtractFilename(strFilename);
      itemSubMenu.InternalData := strFilename;
      itemSubMenu.OnClick.OnEvent := Self.LinkedDocumentOpenClick;
      itemSubMenu := itemDocument.SubItems.Add;
      itemSubMenu.Caption := 'Delete ' + ExtractFilename(strFilename);
      itemSubMenu.OnClick.OnEvent := Self.LinkedDocumentDeleteClick;
      itemSubMenu.InternalData := strFilename;
    end;
end;


Am I missing something?

Thanks,
Scott
ScottWGast
 
Posts: 875
Joined: 23 May 2012 11:02

by Alexander Bulei » 26 Jun 2014 17:42

Hi ScottWGast,

Check the CGScrollStyle property,

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by ScottWGast » 26 Jun 2014 18:16

On the region, I've tried all of the possible options on CGScrollStyle, but none cause the vertical scroll bar to appear... not even cgsbsVerticalVisible.

MissingVerticalScroll.jpg
You do not have the required permissions to view the files attached to this post.
ScottWGast
 
Posts: 875
Joined: 23 May 2012 11:02

by Alexander Bulei » 26 Jun 2014 18:32

Hi ScottWGast,

Please send us the testcase. t.i.a.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by ScottWGast » 30 Jun 2014 18:54

I have emailed you a test project to demonstrate this issue.

Thanks,
Scott Gast
ScottWGast
 
Posts: 875
Joined: 23 May 2012 11:02

by Jorge Sousa » 01 Jul 2014 10:10

Hi Scott

Just set regionFileList.CGScrollStyle:= cgsbsAuto; // or cgsbsBoth

instread of

cgsbsBothVisible

and you can set regionFileList.VertScrollbar.Visible:= False

with best regards
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by ScottWGast » 01 Jul 2014 14:53

I've tried all of the possible CGScrollStyle options, with and without .VertScrollbar.Visible := True/False... still the same result: no vertical scroll bar is being displayed.

Scott
ScottWGast
 
Posts: 875
Joined: 23 May 2012 11:02

by Jorge Sousa » 01 Jul 2014 15:23

Scott

We sent you the demo back by email, working

We also removed <html> and <body> tags from

strCaption :=
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58


Return to General

Who is online

Users browsing this forum: No registered users and 26 guests

Contact Us.