Thread Rating:
  • 314 Vote(s) - 2.82 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Viewのサイズを自動調整する方法
07-12-2013, 12:56 PM,
#2
RE: Viewのサイズを自動調整する方法
View.set-size-from-child を利用することでうまく大きさを調整することができました。


Code:
{def fr1:Frame =
    {Frame
        background = "orange",
        width = {make-elastic preferred-size = 5in},
        height = {make-elastic preferred-size = 2in}
    }
}
{def fr2:Frame =
    {Frame
        background = "pink",
        width = {make-elastic preferred-size = 5in},
        height = {make-elastic preferred-size = 2in}
    }
}
{def fr3:Frame =
    {Frame
        background = "aqua",
        width = {make-elastic preferred-size = 5in},
        height = {make-elastic preferred-size = 2in}
    }
}
{def vb = {VBox fr1, fr3}}
{def v =  {View vb}}
{do  {v.show}}
{CommandButton
    label = "View のグラフィックを変更",
    {on Action do
        {vb.add index = 1, fr2}
    }
}
{CommandButton
    label = "View のサイズを調整",
    {on Action do
        {v.set-size-from-child}
    }
}



Messages In This Thread
RE: Viewのサイズを自動調整する方法 - by umemura - 07-12-2013, 12:56 PM
Forum Jump:


Users browsing this thread:
1 Guest(s)

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1017 - Can't find file: 'mybb_threadviews' (errno: 2)
Query:
INSERT INTO mybb_threadviews (tid) VALUES('940')