Hi all,
I'm trying to change the default height for a panel used for the ShortOptions type because the selected item is only partially visible.
My test code:
Reading back heigth values at the end of the for-loop shows them having the new size (80dip-->160, 60dip-->120..), but visually the preference dialog stays the same as if the new values weren't take in any consideration.
I'm trying to change the default height for a panel used for the ShortOptions type because the selected item is only partially visible.
My test code:
B4X:
Dim sf As Object = prefdialog.ShowDialog(Options1, "OK", "CANCEL")
For i = 0 To prefdialog.PrefItems.Size - 1
Dim pi As B4XPrefItem = prefdialog.PrefItems.Get(i)
If pi.ItemType = prefdialog.TYPE_SHORTOPTIONS Then
Dim ft As B4XView = prefdialog.CustomListView1.GetPanel(i) 'CLV's panel for ShortOptions
Log("panel: "&ft.Height) '100
Dim ft2 As B4XView = ft.GetView(1) 'ShortOptions panel
Log("so view: "&ft2.Height) '60
Dim ft3 As B4XView = ft2.GetView(0) 'ComboBox
Log("cb: "&ft3.Height) '60
ft.Color = Starter.xui.Color_Green
ft.Height = 80dip 'ft.SetLayoutAnimated(0,0dip,0dip,prefdialog.CustomListView1.AsView.Width,80dip)
ft2.Top = 0dip
ft2.Height = 60dip
ft2.Color = Starter.xui.Color_Magenta
ft3.Top=0dip
ft3.Height=50dip
End If
Next
Wait For (sf) Complete (Result As Int)