GrapeCity Forums

The GrapeCity Message Boards
Welcome to GrapeCity Forums Sign in | Join | Help
in Search

Resize cell that contains Signature(Picture) - AddCellSpan

Last post 06-02-2009, 8:13 AM by chpkum80. 9 replies.
Sort Posts: Previous Next
  •  05-25-2009, 2:30 AM 78300

    Resize cell that contains Signature(Picture) - AddCellSpan

    Hi,

    I display the signature(picture) in the cell. And I want to resize the signature to half its size.

    After resizing the signature using AddCellSpan, it is losing its content. It is not displayed properly.

    Can you provide an alternative way to display signature to half its size as well as preserve the content.

    Is there any other methods or functions in Spread to preserve it.

    Thanks for your help in advance.

     


    Regards,

    Praveen
    Filed under:
  •  05-25-2009, 11:22 PM 78327 in reply to 78300

    Re: Resize cell that contains Signature(Picture) - AddCellSpan

    Hello,

    When you create a new ImageCellType, one of the constructors takes a RenderStyle that you can specify how you want the image to render in the cell.


    Scott S.
    Product Manager, Spread ASP.NET
    GrapeCity FarPoint
  •  05-26-2009, 7:33 AM 78337 in reply to 78327

    Re: Resize cell that contains Signature(Picture) - AddCellSpan

    I am using the following code to display signature(picture)

    Call objspd.AddCellSpan(4, objspd.MaxRows, 3, 1)
                Call objspd.AddCellSpan(8, objspd.MaxRows, 3, 1)
               
                strUser = "PR"
                objspd.Col = 8
                objspd.Row = objspd.MaxRows
                objspd.CellType = CellTypePicture
                objspd.TypePictMaintainScale = True
                objspd.TypePictCenter = True
                objspd.TypePictPicture = LoadPicture(objSign.fnFetchSign(code))
                objspd.TypePictStretch = True

    I am working on Vb 6 development project. I can't find any RenderStyle for cell. Could you elaborate on that.


    Regards,

    Praveen
    Filed under:
  •  05-26-2009, 8:36 AM 78338 in reply to 78337

    Re: Resize cell that contains Signature(Picture) - AddCellSpan

     

    Hello,

    Set fpSpread1.TypePictMaintainScale = False and let fpspread1.TypePictStretch = True to get the picture stretched to fit the cell span.

    Let me know if you need further help.

     

    Thanks,

     


    Deepak Sharma
    GrapeCity FarPoint
  •  05-27-2009, 1:05 AM 78371 in reply to 78338

    Re: Resize cell that contains Signature(Picture) - AddCellSpan

    Attachment: Signatures.zip

    Hi Deepak,

    I have attached the Original Signature and Shortened Signature in JPEG format.

    Even after applying fpSpread1.TypePictMaintainScale = False, the image is not coming clear.

    Please provide me the alternative for this. 

    Thanks in advance

    Praveen.

     

     


    Regards,

    Praveen
    Filed under:
  •  05-27-2009, 9:59 AM 78392 in reply to 78371

    Re: Resize cell that contains Signature(Picture) - AddCellSpan

    Hello Praveen,

    Using following code I am able to get a better image in the span. I Figured out that, on increasing the span size the image does show up correctly and changing the format of the image also affects the output.

    fpSpread1.AddCellSpan 2, 2, 3, 1
    fpSpread1.Col = 2
    fpSpread1.Row = 2
    fpSpread1.CellType = CellTypePicture
    fpSpread1.TypePictPicture = fpSpread1.LoadPicture("D:\Books\Pics\Signatures\sign1.bmp", PictureTypeBMP)
    fpSpread1.TypePictCenter = True
    fpSpread1.TypePictStretch = True
    fpSpread1.TypePictMaintainScale = True
    fpSpread1.RowHeight(2) = 60

    fpSpread1.ColWidth(2) = 25

    I have attached a JPEG image as an output for the above code, let me know if it helps you.

     

    Thanks, 


    Deepak Sharma
    GrapeCity FarPoint
  •  06-01-2009, 2:01 AM 78524 in reply to 78392

    Re: Resize cell that contains Signature(Picture) - AddCellSpan

    Hi Deepak,

    Still the problem persists. For LoadPicture, there is no option to select picture type as BMP. I don't know how you have done. 

    My motto is to reduce the signature to half its size and display in Cell. Could you provide an alternative way to preserve its content.

    Praveen. 

     


    Regards,

    Praveen
  •  06-01-2009, 10:34 AM 78548 in reply to 78524

    Re: Resize cell that contains Signature(Picture) - AddCellSpan

    Hello Praveen,

    LoadPicture ( ) takes two arguments one is File path and other is File type.

    There is not a way to reduce the size of the file in the Spread.You have to reduce the size of the file outside the spread and then you can load it into Spread.

     

    Regards,

     


    Deepak Sharma
    GrapeCity FarPoint
  •  06-01-2009, 12:06 PM 78553 in reply to 78524

    Re: Resize cell that contains Signature(Picture) - AddCellSpan

    Praveen,

     I think the peice of information we have forgotten to tell you is that the FarPoint Spread has it's own LoadPicture method. This is the LoadPicture being talked about in these posts. However, Even with this better method of loading the picture, the original picture can not be scaled down to a way you will still be able to comprehend it. This is the same whether you use our Spread control or the built in Image control and try to size it down to the size you are trying to put this picture in Spread.


    Scott S.
    Product Manager, Spread ASP.NET
    GrapeCity FarPoint
  •  06-02-2009, 8:13 AM 78578 in reply to 78553

    Re: Resize cell that contains Signature(Picture) - AddCellSpan

    Thanks Deepak and Scotts for throwing some light on this.
    Regards,

    Praveen
View as RSS news feed in XML
     FarPoint Forums Home