Go to Post To label hard work as unfair is really a bitter assessment. - Koko Ed [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Spotlight this post!  
Unread 03-05-2012, 22:27
Djur's Avatar
Djur Djur is offline
WPILib
AKA: Sam Carlberg
no team
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2009
Location: Massachusetts
Posts: 182
Djur will become famous soon enough
Re: SmartDashboard Window size not saving

The problem seems to be at DashboardFrame.java at line 119:
Code:
// Set the size / look
        if (competition) {
            setPreferredSize(NETBOOK_SIZE); //1024x400 - this is your problem
            setUndecorated(true);
            setLocation(0, 0);
            setResizable(false);
        } else {
            setMinimumSize(MINIMUM_SIZE); //300x200

            // Closing operation is handled manually
            setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);

            DashboardPrefs prefs = DashboardPrefs.getInstance();
            setPreferredSize(new Dimension(prefs.width.getValue(), prefs.height.getValue())); //This is the dimension stored in the save file
            setLocation(prefs.x.getValue(), prefs.y.getValue());
        }
So the DashboardFrame will automatically be set to 1024x800 if you're in competition mode. The easiest (temporary) fix until the 2013 release would be to change
Code:
setPreferredSize(NETBOOK_SIZE);
to
Code:
setPreferredSize(new Dimension(width, height));
with (width, height) being based upon the size of your screen.
__________________
WPILib dev (RobotBuilder, SmartDashboard, GRIP)

Last edited by Djur : 03-05-2012 at 22:48. Reason: line 119
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 20:19.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi