Jump to content

Hide Vertical ScrollBar in TUniScrollBox


eelias

Recommended Posts

[Delphi XE6 Update 2 UniGui 0.96]

 

I am using TUniScrollBox to insert a frame as its parent.

 

I set TFrame.Aling to alClient.

 

My frames sometimes are larger than the window. 

 

I want that only the horizontal scroll bar shows up when needed. Right now both bars are showing up. It seems there is an alignment error on vertical, since the scrollbar is showing up always with a minimal offset (seems that it is the height of the scrollbar itself that is not being considered on the alClient calculation and then it shows  up)

 

I see there is a something like that http://docs-devel.sencha.com/extjs/4.2.1/#!/api/Ext.panel.Table-cfg-scroll

 

However I don't know how to set my ScrollBox based on the ExtJS documentation for this case.

 

This was  not happening on the previous version 0.95 on the very same frame case. Now the scrollbars are showing up.

 

I wonder if someone could give me a hand and tell me how to disable the VERSTICAL bar only.

 

Thanks 

 

Eduardo 

 

 

Link to comment
Share on other sites

Hi Eduardo. 
 
 
Hide: 
procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  UniSession.AddJS(UniScrollBox1.JSName + '.setBodyStyle("overflowY:hidden !important");');
end;
Show: 
UniSession.AddJS(UniScrollBox1.JSName + '.setBodyStyle("overflowY:auto");');

Try...

 
Best regards.
Link to comment
Share on other sites

  • 1 year later...

 

Hi Eduardo. 
 
 
Hide: 
procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  UniSession.AddJS(UniScrollBox1.JSName + '.setBodyStyle("overflowY:hidden !important");');
end;
Show: 
UniSession.AddJS(UniScrollBox1.JSName + '.setBodyStyle("overflowY:auto");');

Try...

 
Best regards.

 

 

in unigui 0.99.50.1185:

my browser get this error message:

O209.setBodyStyle is not a function

Link to comment
Share on other sites

  • 8 years later...
On 7/21/2015 at 4:37 PM, Sherzod said:

Hi,

 

One of the possible solutions, try:

 

UniScrollBox1 -> ClientEvents -> ExtEvents...

function afterrender(sender, eOpts)
{
   sender.el.dom.style.overflowY = "hidden"
}

Best regards.

How to code for TunimScrollBox?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...