Jump to content

uniDBGrid - hide horizontal scrollbar ...


erich.wanker

Recommended Posts

Hello,

i want to hide the horizontal scrollbar of uniDBGrid ..

 

i tryed out:

function OnAfterrender(sender)
{ 
sender.setBodyStyle("overflowX:hidden");
}

 

but doesn´t work...

 

any suggestions ?

 

Thank you

Erich

Link to comment
Share on other sites

Hi Erich.

Try this:

Paste in the MainForm, UniHTMLFrame1

onCreate event in the form paste the following code:

procedure TMainForm.UniFormCreate (Sender: TObject);
begin
  UniHTMLFrame1.HTML.Add ('<style type="text/css"> DIV#' + UniDBGrid1.JSName + '_id-body > DIV {overflow-x: hidden !important;} </style>');
end;

It is one of the solutions.

Best regards.

Link to comment
Share on other sites

  • 6 months later...

Hi Erich.

 

Try this:

 

Paste in the MainForm, UniHTMLFrame1

 

onCreate event in the form paste the following code:

procedure TMainForm.UniFormCreate (Sender: TObject);
begin
  UniHTMLFrame1.HTML.Add ('<style type="text/css"> DIV#' + UniDBGrid1.JSName + '_id-body > DIV {overflow-x: hidden !important;} </style>');
end;

It is one of the solutions.

 

Best regards.

 

 

Hi Duser!

 

Nice to have you around, I see you are always willing to help!

 

Please, I want to use TUniScrollBox and do not have the scrollbars... I have changed AutoScroll to false. That is great, I dont need those ugly scroll bars.

 

However I could not find a way to control the TUniScollBox and make it scroll down or up.

 

But I would like to not use HTMLFrame.

 

Is there another alternative?

 

I have made a Delphi component, where I have a TUniFrame as base and a TuniScrollBox on top of it. 

 

Thank you for any help!

Link to comment
Share on other sites

 

Hi eelias.
 
If I understood correctly, try this:
 
UniSession.AddJS(UniScrollBox1.JSName + '.scrollBy(100, 100);');
 
Sincerely.

 

That worked!

 

Thank you duser, I appreciate your help!

 

Another question if possible:

 

 

I have a problem with the ScrollBox

 

i am placing TUniPanels on the TUniScrollBox

 

One below the other. And all aligned to the top.

 

Then they will be using all the inside area of the TUniScrollBox.

 

That is fine and works.

 

However if during runtime i keep creating more panels inside it, it will show up the Scrollbar. but it is doing wrong, since the Scrollbar is not making the panels to realing considering the space used by the Scrollbar itself.

 

Due this error, it shows up the horizontal scrollbar that makes possible to see the entire panels (left to right)

 

What I want is to add one panel after below each other, and when the vertical scroll bar shows up (because the panels are going more than the visible area) it realign the panels in a way that the horizontal scrollbar does not need to show up.

 

I am sorry if it is confusing.

 

otherwise I need to turn off the AutoSize and put a down and up button for the user scroll thru the scrollbox. But if the scroll list is big that is not going to be nice for the user.

 

Do you have any idea how to do that?

 

Eduardo 

Link to comment
Share on other sites

I Have found that there is something that could help on that:

 

http://docs-devel.sencha.com/extjs/4.1.1/#!/api/Ext.layout.container.Container-cfg-reserveScrollbar

 

there is a reserveScrollBar when set to true, it reserve space for the scrollbars from the begining. That is not perfect, but much better than I have now.

 

How can it be used? it seems to be on the moment of the creation of the TUniScrollBox. But I am not sure.

 

Can you help me?

 

Thanks

 

Eduardo

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...