#1 2016-12-10 15:40:09

fakie
Guest

Can we use application's variables inside the Menu control's items?

Hi David

Would it be possible to use variables in the Menu.Items property in the menu control ?

ie.
Rather than have an item "<span class="glyphicon glyphicon-info-sign"></span> MyApp"

Can we use something "<span class="glyphicon glyphicon-info-sign"></span> [App.ID]" ?

Or is there some way we can parse these ourselves?

#2 2016-12-10 16:57:36

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,715
Website

Re: Can we use application's variables inside the Menu control's items?

Hello fakie,

I am sorry, but, after take a look, apparently is not possible to get something exactly like you wanted at designtime. On the other hand, there is no problem to place a code like this to set the Menu's first item (for example) at runtime:

ArraySetItem "[Menu1.Items]" "0" "<span class=\x22glyphicon glyphicon-info-sign\x22></span> [App.ID]"

Offline

#3 2016-12-10 18:45:07

fakie
Guest

Re: Can we use application's variables inside the Menu control's items?

Great! That will work.

#4 2016-12-10 19:01:05

fakie
Guest

Re: Can we use application's variables inside the Menu control's items?

ArraySetItem "[Menu1.Items]" "0" "<span class='glyphicon glyphicon-info-sign'></span> [App.ID]"

Works as well.

#5 2016-12-10 19:03:26

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,715
Website

Re: Can we use application's variables inside the Menu control's items?

Hello,

fakie wrote:
ArraySetItem "[Menu1.Items]" "0" "<span class='glyphicon glyphicon-info-sign'></span> [App.ID]"

Works as well.

Well, yes. In fact the double quotes escapes are automatically does by the action's editor. If you use single quotes there is OK too.

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.