Re: redraw pictureboxes in image????



On 19 okt, 20:20, "Mike Williams" <mi...@xxxxxxxxxxxxxxxxx> wrote:
"Co" <vonclausow...@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

Mike,

Maybe you are right, I was just thinking that I need to store some
large names in there
underneath the icons. I already changed the code making the height of
the labels 90 so I
can add up to three lines. I use sometimes names of organisations
which have very
long names. For the icon there is no reason to have a bigger place.
Furthermore, like I tried to draw in my posting I want to have a line
between the icons with
a figur in the middle telling how many matches there are between the
two:

-------------------- 8 ---------------------- for example, that also
needs some space.

Marco

.



Relevant Pages

  • Re: redraw pictureboxes in image????
    ... on the size of the container but I need some help. ... its left and the right icon at 3/4 of its left. ... 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. ... 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 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. ...
    (microsoft.public.vb.general.discussion)
  • Re: Fonts Appear Larger in IE7
    ... My minimum is set to 10 pixels, ... which I find OK for occasional use (Labels under icons and stuff like ... that) but Gmail uses this minimum-sized font for the whole of my email, ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: Keep the ration while resizing a form
    ... Keep enough space for your varying captions, use the default font, keep the ... A container such as a Panel or Form or TabPage should calculate ... > size based on the conatained controls and subcontainers and the desired ... > the size of anything in pixels, because giving the size in pixels isn't a ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: 3 columns: reposition X for center column visible/invisible
    ... exceptions) what tags you use from the point of view of display, ... you're setting the width on everything in pixels, ... It's a bit annoying that you have to work out the width of the container ... Also good luck in fitting in the list markers if you want them. ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: points vs pixels.
    ... in pixels only to then have to have them unlearn it later. ... absolute co-ordinates in the null layout, the origin 0,0 is the upper left ... "When you place an object on the screen, you specify the location of its ... container": This is not a function of the layout but of the container. ...
    (comp.lang.java.help)

Loading