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

PictureBox.location: Broken or being used wrong?

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



Joined: 24 Oct 2008
Posts: 16

PostPosted: Wed Jul 07, 2010 7:06 pm    Post subject: PictureBox.location: Broken or being used wrong? Reply with quote

The following code gives me a PictureBox in the far upper left corner of my form, not at an offset of 50, 50 pixels as I would expect, using DFL Release Candidate and DMD 2.047. Is this a bug in DFL or in my code?

import dfl.all;

void main() {
auto form = new Form;
form.minimumSize = Size(800, 600);
auto mg = new MemoryGraphics(300, 300);
auto bmp = mg.toBitmap;
auto pbox = new PictureBox;
pbox.dock = DockStyle.FILL;
pbox.image = bmp;
pbox.location = Point(50, 50);

form.controls.add(pbox);
Application.run(form);
}
Back to top
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Thu Jul 08, 2010 10:53 pm    Post subject: Re: PictureBox.location: Broken or being used wrong? Reply with quote

Since you docked it, it's going to ignore your manual bounds and fill the dock area. You can either handle the layout yourself without dock, or set a dock padding on the form.
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