View previous topic :: View next topic |
Author |
Message |
dsimcha
Joined: 24 Oct 2008 Posts: 16
|
Posted: Wed Jul 07, 2010 7:06 pm Post subject: PictureBox.location: Broken or being used wrong? |
|
|
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 |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Thu Jul 08, 2010 10:53 pm Post subject: Re: PictureBox.location: Broken or being used wrong? |
|
|
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 |
|
|
|
|
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
|