scrollbars

How do I detect if there are scrollbars on a browser window?

爷,独闯天下 提交于 2019-12-07 04:17:15
问题 I need to be able to detect whether there are scrollbars (both vertical and horizontal) on a browser window. I've been using this code but it isn't working reliably in Firefox 5. JFL.GetScrollbarState = function () { var myWidth = 0; var myHeight = 0; if (document.documentElement && document.documentElement.clientWidth) { myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight; } else { myWidth = document.body.clientWidth; myHeight = document.body

Two vertical scrollbars in Firefox when using overflow-x:hidden

随声附和 提交于 2019-12-05 07:24:00
Ive just built a website for a client, and Ive got an odd problem that only occurs in Firefox browser. At the top of the page I have a navigation bar that fills the width of the browser. Ive used the technique described here http://css-tricks.com/full-browser-width-bars/ to achieve the effect as semantically as possible. Then Ive had to place overflow-x:hidden on the html and body tags to prevent the user from being able to scroll off the right side of the screen. This works great in every browser I've tested it in from Safari on Mac/PC, Opera, Chrome and heaven forbid, but even IE7, 8 & 9

How do I detect if there are scrollbars on a browser window?

◇◆丶佛笑我妖孽 提交于 2019-12-05 06:43:07
I need to be able to detect whether there are scrollbars (both vertical and horizontal) on a browser window. I've been using this code but it isn't working reliably in Firefox 5. JFL.GetScrollbarState = function () { var myWidth = 0; var myHeight = 0; if (document.documentElement && document.documentElement.clientWidth) { myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight; } else { myWidth = document.body.clientWidth; myHeight = document.body.clientHeight; } return ({ vScrollbar: document.body.scrollHeight > myHeight, hScrollbar: document.body

Lion scrollbar colors

风流意气都作罢 提交于 2019-12-05 01:58:09
The scrollbars in Lion seem to be based on the HTML's background color (lighter color BG = black scrollbars, darker BG = white). The problem I'm running into is from what (I assume) is a common trick regarding footers. I usually set the background color for my HTML element to be the footer's color, that way if the page is shorter than the browser window the footer appears to continue on (since the BODY element ends and then the HTML element is what shows until the end of the page). Doing this, however, leaves the scrollbar based on the footer's color, not the content area's color. Are there

Using more lines than the window has with ncurses

折月煮酒 提交于 2019-12-03 03:47:11
I have recently been introduced to ncurses for asynchronous keyboard key listening, and getting on well with it. One issue i'm facing is that you can only have text on the visible screen, no scrollbars. I was wondering if its possible to keep using ncurses as it is so lovely, but have the program still keep the scrollbars rather than getting to the last line and staying there. scroll() . You have to set scrollok(win, TRUE) first. Actually if you just want to spew data like a normal terminal you only need to set scrollok() by itself. #include <ncurses.h> int main(void) { int i = 0; initscr();

JScrollPane on JComboBox

倾然丶 夕夏残阳落幕 提交于 2019-12-02 00:25:13
问题 I made a combobox but some of the elements are wider than the width of my box. So I tried to add a horizontal scrolpane and the only I could see is a scrolpane with a combobox inside! Certanly something I do wrong. So here is my code without the jscrolpane. issuerdocumentJComboBox=new JComboBox<>(issuermodel);//the compo box issuerdocumentJComboBox.setBounds(430, 120, 100, 30); searchDocumentesJPanel.add(issuerdocumentJComboBox); How can I add to the combobox a horizontal scrollpane? Thank

No horizontal scroll bar on float right

烂漫一生 提交于 2019-12-02 00:17:11
问题 <html> <head> <style type="text/css" rel="stylesheet"> * {margin:0;padding:0;} div#box {background-color:green;width:1000px;} /* #box {position:absolute;top:0;right:0;} */ /* #box {position:absolute;top:0;left:0;} */ /* #box {float:right;} */ #box {float:left;} .clearer {clear:both;} </style> </head> <body> <div id="box"> asdafdsf </div> <div class="clearer"></div> </body> </html> Uncomment the first float left id with the float right one and you will see. I left my tried solutions commented

JScrollPane on JComboBox

有些话、适合烂在心里 提交于 2019-12-01 22:44:31
I made a combobox but some of the elements are wider than the width of my box. So I tried to add a horizontal scrolpane and the only I could see is a scrolpane with a combobox inside! Certanly something I do wrong. So here is my code without the jscrolpane. issuerdocumentJComboBox=new JComboBox<>(issuermodel);//the compo box issuerdocumentJComboBox.setBounds(430, 120, 100, 30); searchDocumentesJPanel.add(issuerdocumentJComboBox); How can I add to the combobox a horizontal scrollpane? Thank you! It is possible!! Here's a little program I wrote to show my solution: import java.awt.Component;

Creating trackbars to scroll large image in OpenCV Python

╄→尐↘猪︶ㄣ 提交于 2019-12-01 11:39:44
I am trying to create scrollbars in a window created by OpenCv python. I know that I need to implement the code to handle the scrolling/panning process but I have no idea where to start and I've looked everywhere. It is essential that I create the scrollbars in the OpenCV window instead of using some other GUI window framework. Below is the code I am using to load an image and scale the image(which works). Any help is appreciated. And please don't refer me to the opencv documentation on creating trackbars, I've read it and it doesn't help at all. Thanks! import cv2 import cv2.cv as cv import

Autocomplete jquery UI plugin with custom scrollbars

别来无恙 提交于 2019-12-01 09:10:59
did someone try to make custom scrollbars for jquery UI autocomplete widget? I'm trying to use jScrollPane jquery component in combination with autocomplete widget, but so far didn't have any success. If someone knows about some jquery autocomplete component with custom scrollbars, or knows how to change jquery ui autocomplete widget to support jscrollpane component, I would appreciate it. DEMO: http://so.lucafilosofi.com/autocomplete-jquery-ui-plugin-with-custom-scrollbars UPDATED: 22/09/2015 updated to all latest versions: jquery 1.11.3, jquery-ui 1.11.4, jScrollPane 2.0.22 .... open: