jaraiza Active Member Licensed User Longtime User Nov 25, 2018 #1 Hi, I'm trying to attach Spotlight library in a test project. But at first I thought it was going to be easier create external layouts and load them inside a Scroll View instead creating buttons dynamically. So, I have a main scrollview (svServ) and then I load a set of buttons from another layout: Code: Copy svServ.Panel.LoadLayout("lyIcons_Serv") I need to find the button Name to assign it to Spotlight definition: Code: Copy SLight_Cookie.Initialize(Me,"Spotlightmenu",8%y,False,True,True,[BUTTONNAME],Activity) I've been able to find the button: Code: Copy If svServ.Panel.GetView(1) Is Button Then Dim tmpButton = svServ.Panel.GetView(1) As Button End IF But there's not a "name" property. I've used the Tag property for other value I need, and if I want to add more values I need to add a json (or something like that) there. Isn't there any easy way to access the button name? Thanks!
Hi, I'm trying to attach Spotlight library in a test project. But at first I thought it was going to be easier create external layouts and load them inside a Scroll View instead creating buttons dynamically. So, I have a main scrollview (svServ) and then I load a set of buttons from another layout: Code: Copy svServ.Panel.LoadLayout("lyIcons_Serv") I need to find the button Name to assign it to Spotlight definition: Code: Copy SLight_Cookie.Initialize(Me,"Spotlightmenu",8%y,False,True,True,[BUTTONNAME],Activity) I've been able to find the button: Code: Copy If svServ.Panel.GetView(1) Is Button Then Dim tmpButton = svServ.Panel.GetView(1) As Button End IF But there's not a "name" property. I've used the Tag property for other value I need, and if I want to add more values I need to add a json (or something like that) there. Isn't there any easy way to access the button name? Thanks!
Cableguy Expert Licensed User Longtime User Nov 25, 2018 #2 Use an array as tag. Tag supports objects if I'm not mistaken Upvote 0
jaraiza Active Member Licensed User Longtime User Nov 25, 2018 #3 Cableguy said: Use an array as tag. Tag supports objects if I'm not mistaken Click to expand... I've used StringFunctions library and a tag "ButtonName,Data" to split that to a List. But I think I've crashed against a wall... To use Spotlight, I need to create a global variable for each element: Code: Copy Private SPLight01 As SpotLight But I can't do that dynamically... I guess. Upvote 0
Cableguy said: Use an array as tag. Tag supports objects if I'm not mistaken Click to expand... I've used StringFunctions library and a tag "ButtonName,Data" to split that to a List. But I think I've crashed against a wall... To use Spotlight, I need to create a global variable for each element: Code: Copy Private SPLight01 As SpotLight But I can't do that dynamically... I guess.
mangojack Expert Licensed User Longtime User Nov 25, 2018 #4 jaraiza said: I've used StringFunctions library and a tag "ButtonName,Data" to split that to a List. Click to expand... You can also use / store a Map as .Tag property .. Unsure whether that solves your current issue. ? Upvote 0
jaraiza said: I've used StringFunctions library and a tag "ButtonName,Data" to split that to a List. Click to expand... You can also use / store a Map as .Tag property .. Unsure whether that solves your current issue. ?