Converting Spread3 to Spread for Windows issues

Posted by: elwinharrison on 8 September 2017, 1:55 pm EST

  • Posted 8 September 2017, 1:55 pm EST

    I am working on converting several applications which use Spread3 and in some of them I am replacing the old Spread3 grids with Spread for Windows.


    One of the problems that I am trying to deal with is the autosize capability where the size of the grid is automatically resized up to a maximum size. Is there any way to do this without doing a manual calculation?


     Also, is there a way to make the veritical scrollbar line up at the right edge of the last column? 


     

  • Replied 8 September 2017, 1:55 pm EST

     


    Hello ,


    I would really appreciate if you could provide us with the following details so that we can understand the issue in a better way,


    1.Is Spread3(version) for Windows or is it for COM?


    2.Version of Spread for Windows you are upgrading to and using what .Net Framework?


    3.Please elaborate on "to make the veritical scrollbar line up at the right edge of the last column" .


    Thanks,

  • Replied 8 September 2017, 1:55 pm EST

    The Spread3 is COM.


    The verison of Spread for Windows is 3. something.


    As far as my last question, what I am trying to do is have the scrollbar adjoin the last column on the right side of the grid. 


     

  • Replied 8 September 2017, 1:55 pm EST

     


    Hello,


    We have an AutoSize property in COM version of Spread to adjust the size of the Spread, however there is no such property available in Spread for Windows.We need to manually calculate the Height & Width for all the columns and rows including headers to get  the size adjusted.


    If I got your next concern correctly , you want the vertical scroll bar to appear when the focus is in the last column, which can be achieved using the following code for EnterCell Event.


    <FONT color=#0000ff size=2><FONT color=#0000ff size=2>Private</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Sub</FONT></FONT><FONT size=2> FpSpread1_EnterCell(</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>ByVal</FONT></FONT><FONT size=2> sender </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>As</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Object</FONT></FONT><FONT size=2>, </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>ByVal</FONT></FONT><FONT size=2> e </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>As</FONT></FONT><FONT size=2> FarPoint.Win.Spread.EnterCellEventArgs) </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Handles</FONT></FONT><FONT size=2> FpSpread1.EnterCell


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>If</FONT></FONT><FONT size=2> e.Column = FpSpread1.ActiveSheet.ColumnCount - 1 </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Then

    </FONT></FONT><FONT size=2>

    FpSpread1.VerticalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.Always


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Else

    </FONT></FONT><FONT size=2>

    FpSpread1.VerticalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.Never


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>End</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>If

    </FONT></FONT><FONT size=2>

    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>End</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Sub</FONT></FONT>


    <FONT color=#000000>Let me know if you need further help.</FONT> 


    Thanks,

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels