Re: redraw pictureboxes in image????
- From: "Mike Williams" <mikea@xxxxxxxxxxxxxxxxx>
- Date: Fri, 19 Oct 2007 19:20:58 +0100
"Co" <vonclausowitz@xxxxxxxxx> wrote in message
news:1192798459.962138.165000@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have been trying to make the places of the icons depending
on the size of the container but I need some help. I want the
icons to be displayed in the container independent of its size
always on the same location. Being the left icon at 1/4 from
its left and the right icon at 3/4 of its left. Can that be done?
Yes, it can certainly be done, very easily. But it doesn't seem to make much sense for the specific job you are doing. Are you sure you have thought it through properly? I don't know what sort of sizes you envisage for the container, but taking an example of a container that is 200 pixels wide, you've already said that you want one image to be 40 pixels wide and the other to be about 26 pixels or 28 pixels wide. That's a total 68 pixels. If you place the images as you have just specified there will be 50 pixels space at the left and 50 pixels space at the right. All in all that's a total of 168 pixels for the images and the spaces at the left and right. That leaves just 32 pixels for the middle. Moreover, the small 32 pixel wide middle space will be offset quite a lot to either the left or right of centre, depending on whether the larger image is at the left or the right. That small 32 pixel space, according to your previous explanations, is also supposed to contain details of the number of matches found.
So you end up with two fairly wide spaces at the left and right, neither of which is performing any really useful function at all, and a very small 32 pixel wide space in the middle that is having a very important part of the overall output squashed into it. Furthermore, that small 32 pixel wide space is not even approximately in the middle! Also, when you look at the maximum size of the Labels, which are of necessity centralised horizontally beneath beneath each image, in order for them to be properly centred (in this specific example) and also to not overlap the central point of the "approximately middle" space, the Label beneath the large image cannot be wider than 72 pixels and the Label beneath the small image cannot be wider than 60 pixels, severely restricting their usefulness and further reinforcing the waste of valuable "real estate" at the left and right sides of the container.
Using the layout arrangement in the example code I previously posted, both Labels can be almost 100 pixels wide (in the example we've just looked at) and still be perfectly aligned against the images and perform a very useful function while allowing a decent amount of "real estate" for the details that are required to be drawn into the centre part of the container. Moreover, in my example the central part is very much nearer the actual centre of the container than it would be if we changed things in the way you have just suggested. The arrangement in my previous code is of course hard coded for a specific size of container, but it would be very easy to modify it so as to maintain the same basic layout on containers of any size.
I have similar reservations about your desired vertical placement (unless there is some other use for the otherwise unused "white space" that you have not yet told us about). Would you perhaps like to think this through a bit more thoroughly and think again about what you actually want?
Mike
.
- Follow-Ups:
- Re: redraw pictureboxes in image????
- From: Co
- Re: redraw pictureboxes in image????
- References:
- Re: redraw pictureboxes in image????
- From: Co
- Re: redraw pictureboxes in image????
- From: Mike Williams
- Re: redraw pictureboxes in image????
- From: Co
- Re: redraw pictureboxes in image????
- From: Mike Williams
- Re: redraw pictureboxes in image????
- From: Co
- Re: redraw pictureboxes in image????
- From: Mike Williams
- Re: redraw pictureboxes in image????
- From: Co
- Re: redraw pictureboxes in image????
- From: Mike Williams
- Re: redraw pictureboxes in image????
- From: Co
- Re: redraw pictureboxes in image????
- From: Co
- Re: redraw pictureboxes in image????
- From: Mike Williams
- Re: redraw pictureboxes in image????
- From: Co
- Re: redraw pictureboxes in image????
- From: Mike Williams
- Re: redraw pictureboxes in image????
- From: Co
- Re: redraw pictureboxes in image????
- From: Mike Williams
- Re: redraw pictureboxes in image????
- From: Co
- Re: redraw pictureboxes in image????
- From: Mike Williams
- Re: redraw pictureboxes in image????
- From: Co
- Re: redraw pictureboxes in image????
- Prev by Date: Re: Printer object - heads up please
- Next by Date: Re: PDF output
- Previous by thread: Re: redraw pictureboxes in image????
- Next by thread: Re: redraw pictureboxes in image????
- Index(es):
Relevant Pages
|