Change dialog height

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

Change dialog height

Post by sashapont » Wed Feb 13, 2019 10:20 pm

How I can change fiakog height in runtime like moai.Set("dlg3", "height",preferencesh)?

User avatar
airsoftsoftwair
Posts: 3155
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Change dialog height

Post by airsoftsoftwair » Thu Feb 14, 2019 4:06 pm

Just set Window.Height when creating the dialog. You cannot change it at runtime.

sashapont
Posts: 130
Joined: Thu Aug 03, 2017 2:49 pm

Re: Change dialog height

Post by sashapont » Thu Feb 14, 2019 8:19 pm

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: 347
Joined: Thu Feb 24, 2011 11:08 pm

Re: Change dialog height

Post by lazi » Fri Feb 15, 2019 9:47 am

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