Picture box alignment

8 posts, 0 answers
  1. James Shelton-Agar
    James Shelton-Agar avatar
    108 posts
    Member since:
    May 2008

    Posted 02 Feb 2011 Link to this post

    When working with picturebox, which sizing is "ScaleProptional", can we set alignment to be at right? dock doesn't seems to be working
  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 03 Feb 2011 Link to this post

    Hi James,

    The TextAlign and VerticalAlign properties do not contain any meaning for the PictureBox item they are both responsible for alignment of text.
    The Dock property determines how a report item is resized with its parent e.g. setting Dock to Bottom causes the report item to align itself with the bottom edges of its parent and to resize as the parent is resized.

    Regards,
    Steve
    the Telerik team
    Get started with Telerik Reporting with numerous videos and detailed documentation.
  3. James Shelton-Agar
    James Shelton-Agar avatar
    108 posts
    Member since:
    May 2008

    Posted 03 Feb 2011 Link to this post

    when the image width is random, if the width wider than PictureBox, it will scaled by ratio but if less than PictureBox's width, image will aligned into center, any idea?
  4. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 07 Feb 2011 Link to this post

    Hello James,

    This is the behavior by design. Here is the description of the ScaleProportional property from the PictureBox help article:
    "The image is sized proportionally (without clipping), so that it's best fitted to the picturebox item. If the height and width ratio of the picturebox item is the same as the image's ratio it will be resized to exactly fit into the picturebox item. Otherwise the closest fitting side (height or width) of the image will be sized to the item and the other side (height or width) of the image sized proportionally (leaving empty space)."

    Kind regards,
    Steve
    the Telerik team
    Get started with Telerik Reporting with numerous videos and detailed documentation.
  5. Morten Louw
    Morten Louw avatar
    21 posts
    Member since:
    Sep 2008

    Posted 06 May 2011 Link to this post

    I agree. It would be nice to be able to control the alignment of the open content. The white filling area.
    Not the textalign, but a picturealign!

    My hack will be to analyze the pictures pixel-dimensions using System.Drawing.Image, and set the picturebox width based on that.
    It has to be by code. It would have been nice to do databinding instead - and a more declarative approach in general...

    Kind Regards,
    Morten
  6. Chavdar
    Admin
    Chavdar avatar
    898 posts

    Posted 11 May 2011 Link to this post

    Hi Morten Louw,

    Here is one more suggestion before you implement your solution with code. Try with PictureBox.Sizing mode set to AutoSize and then dock the PictureBox item to the right. In this case the width of the PictureBox should be set to the greatest possible image width and the detail section's width should be that of the page without margins. If this approach does not help then as a last resort you can specify the size and the location of the PictureBox item using user functions and bindings.

    Best wishes,
    Chavdar
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Mark
    Mark avatar
    58 posts
    Member since:
    Oct 2014

    Posted 27 Jan Link to this post

    we are running into the same issue. Any other tools that we have used when using the scaling of "Scale Proportional", the image us usually aligned TOP/LEFT. In the Telerik PictureBox control, it's always CENTERED both Vertically and Horizontally. I know this thread is old, but is there any way to have an option, in the future, to allow us to how to align the image after it is scaled in the control?

     

    Thanks

  8. Katia
    Admin
    Katia avatar
    544 posts

    Posted 01 Feb Link to this post

    Hi Mark,

    This option is not supported at the moment.

    Feel free to add a request for it into our feedback portal and describe the exact functionality you expect from a PictureBox item.
    This way other community members also interested in this functionality can vote for it which will raise its priority. New features are selected for development based on the interest from the community members.


    Regards,
    Katia
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top