B4J Question Maximize button doesn't fire resize event ?

Discussion in 'B4J Questions' started by tufanv, Aug 9, 2017.

  1. tufanv

    tufanv Expert Licensed User

    Hello,

    I have this :
    Code:
    Sub MainForm_Resize (Width As Double, Height As Double)
        TableView1.SetColumnWidth(
    0,TableView1.Width*0.05)
        TableView1.SetColumnWidth(
    1,TableView1.Width*0.14)
        TableView1.SetColumnWidth(
    2,TableView1.Width*0.17)
        TableView1.SetColumnWidth(
    3,TableView1.Width*0.14)
        TableView1.SetColumnWidth(
    4,TableView1.Width*0.20)
        TableView1.SetColumnWidth(
    5,TableView1.Width*0.20)
        TableView1.SetColumnWidth(
    6,TableView1.Width*0.09)
       

    End Sub
    if I click and drag the change the size of from everything works perfect , tableview's column are changing according to dragged value but if i click maximize button on top right , tableview's columns are staying as they are , and they are not resizing . How can I make them resize also just like chaning the form size with mouse.

    Thanks
     
  2. stevel05

    stevel05 Expert Licensed User

    Use TableView1.PrefWidth instead of TableView1.Width
     
    tufanv likes this.
  3. tufanv

    tufanv Expert Licensed User

    Yes ! Works perfect. Thanks
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice