Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 560887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:23:29+00:00 2026-05-13T12:23:29+00:00

I have a panel in witch I represent a timeline – 24 hours( 24

  • 0

I have a panel in witch I represent a timeline – 24 hours(24 x 60 min = 1 440 min).

I need to set my scroll bar’s step to a minute. It’s evident that minimum size of such a panel should be 1440 pixels.

Let’s say the screen resolution on the client screen (width) is 1280, so say panel container max size is 1280.
Now, if I want my step be a minute I need to set the step to the scrollbar’s container to 1280 / 1440 = 0.(8) – but it’s impossible, cause the Step (myContainer.HorizontalScroll.SmallChange) is an int value…

Can I do something to this?

EDIT

Maybe 0.2 pixel per minute can be considered a inobservable error, but if my step will be 5 minutes, it will in reality be 4.(4)px but in scrollbar = 5, a step of 10 minutes will be = 8.(8)px : 10px. On a 800×600 screen the 10min step will be = 5.(5)px : 10px, so in each 2 clicks(20 min) I have 4 pixel error. This “delta” became visible.

Finally, this is a sample, that DOES NOT work – even if I arrive to make the scrollbar visible – strange scrollbar visibility is unpredictable… – I can’t scroll all the VOLVO logo in 6 (60Maxim/10smallChange) steps…:

alt text http://lh6.ggpht.com/_1TPOP7DzY1E/S1eOPUlVvQI/AAAAAAAAC8M/ZFWDI_aaJxI/s800/panels.png

Designer:

this.panel2.BackgroundImage =  ....Resources.volvo_logo;
this.panel2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;

Code:

public partial class Form1 : Form
{
    private System.Windows.Forms.Button button1;
    private System.Windows.Forms.Panel panel1;
    private System.Windows.Forms.Panel panel2;

    public Form1()
    {
        InitializeComponent();

        panel1.AutoScroll = false;

        panel1.HorizontalScroll.Maximum = 60;
        panel1.HorizontalScroll.SmallChange = 10;

        panel1.HorizontalScroll.LargeChange = 10;
        panel1.HorizontalScroll.Visible = true;

        panel1.Scroll += new ScrollEventHandler(panel1_Scroll);
    }

    void panel1_Scroll(object sender, ScrollEventArgs e)
    {
        Console.WriteLine(
            "Scroll: OldVal {0}, NewVal {1},  Orientation {2}, Type {3}", 
            e.OldValue, e.NewValue, e.ScrollOrientation, e.Type);
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T12:23:30+00:00Added an answer on May 13, 2026 at 12:23 pm

    Set the ClientSize in pixels (1440) and leave the small change = 1. It will also be in pixels and will match your minutes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a panel with AutoScroll set to true . In it, I am
I am in need of layout with resizable columns. I have a panel with
I have Panel with set of fields,Those fields have some bundled validation rules and
I have Panel with a BottomToolbar . I want to add and remove dynamically
I have stack panel with custom controls in it. I attach standard MouseDragElementBehavior to
I have stack panel with custom controls in it. User can add or remove
I have a panel with transparent background which i use to draw an image.
suppose I have a panel with draggable element, and a droppable container,when I drag
I have a panel grid with various checkboxes. A checkbox is associated with a
I have and Update Panel with a Grid inside of it. The grid's data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.