Page 1 of 1
Change dialog height
Posted: Wed Feb 13, 2019 10:20 pm
by sashapont
How I can change fiakog height in runtime like moai.Set("dlg3", "height",preferencesh)?
Re: Change dialog height
Posted: Thu Feb 14, 2019 4:06 pm
by airsoftsoftwair
Just set
Window.Height when
creating the dialog. You cannot change it at runtime.
Re: Change dialog height
Posted: Thu Feb 14, 2019 8:19 pm
by sashapont
It is not good!
Is it possible to use variables in xml like this
preferencesh=200
Function p_OpenDialogPreferences()
moai.CreateDialog([[<?xml version="1.0" encoding="iso-8859-1"?>
<dialog id="dlg3" title="Preferences" width="300" height= preferencesh > ???
Re: Change dialog height
Posted: Fri Feb 15, 2019 9:47 am
by lazi
As the CreateDialog() uses simple string for the xml, you can use it like this:
Code: Select all
preferencesh=200
Function p_OpenDialogPreferences()
moai.CreateDialog([[<?xml version="1.0" encoding="iso-8859-1"?>
<dialog id="dlg3" title="Preferences" width="300" height="]] .. preferencesh .. [["> ???