scrollbar

How to catch scrolling event in DBGrid in Delphi

99封情书 提交于 2019-12-24 13:33:55
问题 I have a DBGrid, I need to run some code, each time the horizontal scrollbar is used. I couldn't find such event in DBGrid. Can you advise something? 回答1: Maybe this will help. It shows an example for trapping the scrolling events of a regular TStringGrid. Synchronize the Scrolling of two TStringgrids? 回答2: There is a WMHScroll procedure in TCustomGrid, but it is private. You can't use it in a DBGrid. You would have to create your own TDBGrid descendant and do your own procedure WMHScroll(var

Vertical Scrolling Sync For 2 Divs

自古美人都是妖i 提交于 2019-12-24 12:12:25
问题 I am trying to sync the vertical scrolls of 2 divs; One is TinyMCE editor's body, and the other one is dynamically created preview div. The preview looks like this: For the preview div, I managed to get the % of the scroll by using: setup : function(ed) { ed.on('init', function() { $('.editorContainer > .mce-tinymce > .mce-container-body').children().eq(2).on('scroll', function () { var tmceBody = ed.getBody(); console.log("this offsetHeight: " + this.offsetHeight); // 501 console.log("this

Set large value to div's height

谁都会走 提交于 2019-12-24 12:08:22
问题 I have a problem with height limitation of <div></div> in some web browsers, like Firefox. I have javascript code like this: $('#MyDiv').css("height","20000000px"); // 20,000,000 pixel height But I see height: 2e+7px; rule in the firebug. This problem exist in IE too, But in google chrome everything is ok and I see height: 20000000px; . How can I set very large value to div's height in a way that works for most browsers? EDIT: firefox has no scrollbar in this div, but google chrome has

Scrolling PictureBox

↘锁芯ラ 提交于 2019-12-24 11:54:06
问题 I am trying to make an application that is drawing Dendrograms like this one. So I added a PictureBox to the winform, and for start, I wanted to wrote all labels like in the picture with this code: foreach (var line1 in lines) { i++; gpx.DrawString(line1, myFont, Brushes.Green, new PointF(2, 10 * i)); } But the problem is that I have a lot of labels so it writes only a few of them on 800x600 px. I wanted to add scrolling bars, but it doesn't work at all. It works only when I am setting an

Scrollbar automatically hidden unless I resize the page

最后都变了- 提交于 2019-12-24 11:50:56
问题 I am using a js plugin to create scroll bars. Basically, when you load the page, it automatically sets itself to "display: none" when it shouldn't be. Then, if you resize the browser even a little bit, it switches itself to "display: block" and works correctly. I can't for the life of me figure out what is wrong, especially because it is an exact replica of the code from the past two (different IDs) that are functioning correctly. I believe this is the relevant code, but I can include other

How to change a ListBox's Vertical Scrollbar's Repeat Button Size in WPF

僤鯓⒐⒋嵵緔 提交于 2019-12-24 10:56:52
问题 I have a ListBox control with a vertical scrollbar. I would like to increase the Repeat Buttons' Height to something bigger because our UI is touch-compatible. Is there a simple way to do it ? Thank you and best regards, Romanin 回答1: Easiest is to modify the ControlTemplate for a vertical scrollbar and change it to what you want: ScrollBar ControlTemplate Example 回答2: It's not so easy to just change the button sizes, because they are hardcoded in the default template. But you can scale the

Can't get scroll bar to appear on overflow

眉间皱痕 提交于 2019-12-24 08:16:06
问题 I'm building a MDI WEB application, and have a window created made by a article element, with a header and a section for content. Since it's an MDI app, the article is set to absolute , so it can overlap other windows. I need a scrollbar to appear in the content section, but not in the header . <article id="win3"> <header> … </header> <section> … </section> </article> CSS: article { position: absolute; min-width: 500px; width: 918px; margin: 0px; padding: 0px; overflow: hidden; background

Python: Decide which scrollbar is moving in ScrolledPanel

ぃ、小莉子 提交于 2019-12-24 06:58:21
问题 This question continue the question on the link : wxPython Event for ScrolledPanel. I edited the code a little bit so that OnScroll function get the x position of the content's scrollbar and use that to set x position of the header's scrollbar. My problem is I cannot decide when the horizontal scrollbar is rolled. So my program now has the header's horizontal scrollbar rolled whenever any of the content's scrollbars is rolled while I want the header's h-scrollbar rolled when the content's h

centre thumbnail in scrollbar (jQuery)

点点圈 提交于 2019-12-24 06:41:29
问题 Please check out this page: http://onomadesign.com/wordpress/identity-design/hans-appenzeller/ The thumbnails on the right, link to different portfolio items (Wordpress single posts). I want the thumbnail of the active project to be vertically centred in the scrollbar when the user enters the page. Right now, it resets the scrollbar, so people lose sight of navigation. How to accomplish this using jQuery? Thanks. 回答1: First add the class of "selected" to the li of the current link and use

How to hide the scroll bar and with the content ramaining scrollable? [duplicate]

泪湿孤枕 提交于 2019-12-24 06:41:02
问题 This question already has answers here : Hide scroll bar, but while still being able to scroll (31 answers) Closed 2 years ago . I want to print my html page into a PDF file, but don't want the scroll bar showing there in the PDF file. And my page have a scrollable body, so if I set this: * { overflow: hidden; } The body will be incomplete in the final pdf file. So if there is a way just prevent the scrollbar from showing but the content still scrollable? 回答1: There is a CSS rule that can