Change dialog height

Discuss GUI programming with the RapaGUI plugin here
Post Reply
sashapont
Posts: 152
Joined: Thu Aug 03, 2017 2:49 pm

Change dialog height

Post by sashapont »

How I can change fiakog height in runtime like moai.Set("dlg3", "height",preferencesh)?
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Change dialog height

Post by airsoftsoftwair »

Just set Window.Height when creating the dialog. You cannot change it at runtime.
sashapont
Posts: 152
Joined: Thu Aug 03, 2017 2:49 pm

Re: Change dialog height

Post 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 > ???
User avatar
lazi
Posts: 625
Joined: Thu Feb 24, 2011 11:08 pm

Re: Change dialog height

Post 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 .. [["> ???
Post Reply