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 7782053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:25:15+00:00 2026-06-01T19:25:15+00:00

I have a flow layout. Inside it I have about 900 tables. Each table

  • 0

I have a flow layout. Inside it I have about 900 tables. Each table is stacked one on top of the other. I have a slider which resizes them and thus causes the flow layout to resize too.

The problem is, the tables should be linearly resizing. Their base size is 200×200. So when scale = 1.0, the w and h of the tables is 200.

Here is an example of the problem:

enter image description here

My issue is when delta is 8 instead of 9. What could I do to make sure my increases are always linear?

void LobbyTableManagaer::changeTableScale( double scale )
    {
        setTableScale(scale);
    }

    void LobbyTableManager::setTableScale( double scale )
    {
        scale += 0.3;
        scale *= 2.0;

        float scrollRel = m_vScroll->getRelativeValue();
        setScale(scale);
        rescaleTables();
        resizeFlow();
    ...

    

    double LobbyTableManager::getTableScale() const
        {
            return (getInnerWidth() / 700.0) * getScale();
        }

    void LobbyFilterManager::valueChanged( agui::Slider* source,int val )
    {
        if(source == m_magnifySlider)
        {
            
            DISPATCH_LOBBY_EVENT
            {
                (*it)->changeTableScale((double)val / source->getRange());
            }
        }
    }

In short, I would like to ensure that the tables always increase by a linear amount. I cant understand why every few times delta is 8 rather than 9.

Thanks

  • 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-06-01T19:25:16+00:00Added an answer on June 1, 2026 at 7:25 pm

    Look at your “200 X Table Scale” values, they are going up by about 8.8. So when it is rounded to an integer, it will be 9 more than the previous value about 80% of the time and 8 more the other 20% of the time.

    If you really need the increases to be the same size every time, you have to do everything with integers. Otherwise, you have to adjust your scale changes so the result is closer to 9.0.

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

Sidebar

Related Questions

I have a flow layout. Inside it I have about 900 tables. Each table
I have panel which is using flow layout. How can I make break in
I have two UILabels in a XIB file, one on top of the other,
Brief Idea about the flow : I have say minimum 1 and maximum 18
I have a flowlayout panel which has a textfield inside. Although the textfield is
So I have a bunch of JTable s. Each JTable is inside a JScrollPane
I have a HTML+CSS grid layout as in this screenshot , which is essentially
I was thinking about ways to exploit the flow layout panel control, and I
I have a panel with flow layout, and it can contain a variable number
I have a JPanel inside BorderLayout.CENTER The JPanel has a Grid Layout, and I

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.