Jump to content

custom scrollbar


Point

Recommended Posts

1 hour ago, Sherzod said:

Hello,

Are you sure you have attached the correct test case?

yes.

i downloaded that file and contain the test case project.

Is the test case project work well on there ?. in here the unicontainerpanels not fully cover even though in the layout config, have set 100%.

Link to comment
Share on other sites

2 hours ago, Popo said:

hello,

I tried to customize the scrollbar base on this site : https://www.w3schools.com/howto/howto_css_custom_scrollbar.asp
but the scrollbar's width doesn't seem to change so the panel doesn't fully cover.

any suggestion

Thank you in advance.

scrollbar.png

testcase.7z 5.17 kB · 2 downloads

hi sherzod,

I mean there is a space between unicontainerpanel and scrollbar. so the unicontainerpanels not fully cover the form/screen.

thanks you.

Link to comment
Share on other sites

36 minutes ago, Popo said:

I mean there is a space between unicontainerpanel and scrollbar. so the unicontainerpanels not fully cover the form/screen.

Sorry for clarification, could you indicate the problematic point in the screeshot?

Link to comment
Share on other sites

10 hours ago, Popo said:

I mean there is a space between unicontainerpanel and scrollbar. so the unicontainerpanels not fully cover the form/screen.

Hello,

Can you try this approach?

UniContainerPanel2 -> ClientEvents -> ExtEvents ->

function resize(sender, width, height, oldWidth, oldHeight, eOpts) 
{
    sender.getEl().select('.x-box-inner').setStyle('width', null);
    sender.getRefItems().forEach(function(item) {
        item.setStyle('width', sender.getWidth() + 'px')
    });
}

 

Link to comment
Share on other sites

14 hours ago, Sherzod said:

Hello,

Can you try this approach?

UniContainerPanel2 -> ClientEvents -> ExtEvents ->


function resize(sender, width, height, oldWidth, oldHeight, eOpts) 
{
    sender.getEl().select('.x-box-inner').setStyle('width', null);
    sender.getRefItems().forEach(function(item) {
        item.setStyle('width', sender.getWidth() + 'px')
    });
}

 

hi sherzod,

that code not work if UniContainerPanel2 inside uniframe. 

i try to put on resize function in uniframe, but not work too. uniFrame -> ClientEvents -> ExtEvents

Link to comment
Share on other sites

5 hours ago, Popo said:

testcase.7z 7.62 kB · 0 downloads

You can use a different solution I think.

https://idiotwu.github.io/smooth-scrollbar/

1. Download: https://raw.githubusercontent.com/idiotWu/smooth-scrollbar/900f2434f8b61237af52de3bf9f07c87c0638917/dist/smooth-scrollbar.js

2. CustomFiles:

files/smooth-scrollbar.js

3. CustomCSS:

Remove the classes you defined for scrolling.

4. UniFrame -> AutoScroll = False

5. UniFrame -> ClientEvents -> ExtEvents ->

function boxready(sender, width, height, eOpts)
{
    Scrollbar.init(document.querySelector('#'+  sender.id +'-innerCt'), {});
}

 

Link to comment
Share on other sites

  • 1 month later...
On 7/11/2021 at 5:26 PM, Sherzod said:

You can use a different solution I think.

https://idiotwu.github.io/smooth-scrollbar/

1. Download: https://raw.githubusercontent.com/idiotWu/smooth-scrollbar/900f2434f8b61237af52de3bf9f07c87c0638917/dist/smooth-scrollbar.js

2. CustomFiles:


files/smooth-scrollbar.js

3. CustomCSS:

Remove the classes you defined for scrolling.

4. UniFrame -> AutoScroll = False

5. UniFrame -> ClientEvents -> ExtEvents ->


function boxready(sender, width, height, eOpts)
{
    Scrollbar.init(document.querySelector('#'+  sender.id +'-innerCt'), {});
}

 

@Sherzod How will you tell this Scrollbar to scroll to the top in code?

Link to comment
Share on other sites

  • 1 year later...
On 7/11/2021 at 10:26 PM, Sherzod said:

You can use a different solution I think.

https://idiotwu.github.io/smooth-scrollbar/

1. Download: https://raw.githubusercontent.com/idiotWu/smooth-scrollbar/900f2434f8b61237af52de3bf9f07c87c0638917/dist/smooth-scrollbar.js

2. CustomFiles:

files/smooth-scrollbar.js

3. CustomCSS:

Remove the classes you defined for scrolling.

4. UniFrame -> AutoScroll = False

5. UniFrame -> ClientEvents -> ExtEvents ->

function boxready(sender, width, height, eOpts)
{
    Scrollbar.init(document.querySelector('#'+  sender.id +'-innerCt'), {});
}

 

I'm getting error:

image.png.1685ac2d0be9dcbb63c6b50d60dbc7e0.png

Link to comment
Share on other sites

  • 1 month later...
On 7/11/2021 at 12:26 PM, Sherzod said:

You can use a different solution I think.

https://idiotwu.github.io/smooth-scrollbar/

1. Download: https://raw.githubusercontent.com/idiotWu/smooth-scrollbar/900f2434f8b61237af52de3bf9f07c87c0638917/dist/smooth-scrollbar.js

2. CustomFiles:

files/smooth-scrollbar.js

3. CustomCSS:

Remove the classes you defined for scrolling.

4. UniFrame -> AutoScroll = False

5. UniFrame -> ClientEvents -> ExtEvents ->

function boxready(sender, width, height, eOpts)
{
    Scrollbar.init(document.querySelector('#'+  sender.id +'-innerCt'), {});
}

 

 

out of curiosity, would I be able to use this styling in the unitreemenu?
I managed to make the auto scroll following the topic

 


works perfectly, but the scroll when it appears is outside the current theme

I'm using delphi 10.3.3
unigui version 1.90.0.1551

 

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