FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Setting form start position

 
Post new topic   Reply to topic     Forum Index -> DFL
View previous topic :: View next topic  
Author Message
Andrej08



Joined: 31 Aug 2010
Posts: 51

PostPosted: Fri Sep 10, 2010 7:23 pm    Post subject: Setting form start position Reply with quote

Using DFL and D2.

I'm trying to set the start position in the constructor of a subclass of Form:
desktopLocation(Point(500, 0));

But everytime I start the app, the window is located in a different place. There seems to be a startPosition setter, but if I call it then I can't resize my window, e.g.:

startPosition = FormStartPosition.WINDOWS_DEFAULT_BOUNDS;
clientSize = dfl.all.Size(400, 400); // won't work

Any ideas?
Back to top
View user's profile Send private message
Andrej08



Joined: 31 Aug 2010
Posts: 51

PostPosted: Mon Sep 13, 2010 1:05 pm    Post subject: Reply with quote

Okay, figure it out:

Code:

      startPosition = FormStartPosition.MANUAL;
      size = Size(380, 400);
      setDesktopLocation(100, 0);


DFL ROCKS! Smile
Back to top
View user's profile Send private message
Andrej08



Joined: 31 Aug 2010
Posts: 51

PostPosted: Mon Sep 13, 2010 1:07 pm    Post subject: Reply with quote

I figured it out:

Code:

        startPosition = FormStartPosition.MANUAL;
        size = Size(380, 400);
        setDesktopLocation(100, 0);


Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DFL All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group