LucaMs Expert Licensed User Longtime User Aug 26, 2014 #1 This is something which I have always felt the lack. While searching here on the site if there was at least a way to match the indexes (badly explained but now it does not matter) I found this thread/Library: XmlLayoutBuilder - Load Xml layouts In the example, there is: Code: Dim x As XmlLayoutBuilder ' ... Panel1 = x.GetView("panel1") In addition, Periklis Koutsogiannis has found a way to solve this problem. How we can do it?
This is something which I have always felt the lack. While searching here on the site if there was at least a way to match the indexes (badly explained but now it does not matter) I found this thread/Library: XmlLayoutBuilder - Load Xml layouts In the example, there is: Code: Dim x As XmlLayoutBuilder ' ... Panel1 = x.GetView("panel1") In addition, Periklis Koutsogiannis has found a way to solve this problem. How we can do it?
ilan Expert Licensed User Longtime User May 19, 2017 #21 LucaMs said: At least you could use a map in this way: mapTag.Put("ViewName", ObjOfYourType) Click to expand... i am not sure if i understand you well or you didnot understood what is my problem. the thing is that i create my views in DESIGNER and i want to use the same EVENT (SUB) for several views so to to know what view was clicked with the sender method i could use the tag property but i NEED it for a dynamic TYPE object that will change in code. so this is not an option. if i could get the view NAME i could use it to know what view was pressed. Upvote 0
LucaMs said: At least you could use a map in this way: mapTag.Put("ViewName", ObjOfYourType) Click to expand... i am not sure if i understand you well or you didnot understood what is my problem. the thing is that i create my views in DESIGNER and i want to use the same EVENT (SUB) for several views so to to know what view was clicked with the sender method i could use the tag property but i NEED it for a dynamic TYPE object that will change in code. so this is not an option. if i could get the view NAME i could use it to know what view was pressed.
LucaMs Expert Licensed User Longtime User May 19, 2017 #22 ilan said: here i am using the tag object but if i do it i have no way to use it for a type object that changes in code. Click to expand... Could you use your code and create maps at runtime and after add them to the tags? Upvote 0
ilan said: here i am using the tag object but if i do it i have no way to use it for a type object that changes in code. Click to expand... Could you use your code and create maps at runtime and after add them to the tags?
ilan Expert Licensed User Longtime User May 19, 2017 #23 LucaMs said: Could you use your code and create maps at runtime and add after them to the tags? Click to expand... no i have a list with lots of items and when i click on it a panel will open with about 10 views then i will fill all view tags with a custom TYPE object from the item that was clicked and use all those tag properties when i save the item again so the tag will always change and it will need to hold the custom TYPE object when i click on it. if i will set the tag to something different i will loose the custom type object. Upvote 0
LucaMs said: Could you use your code and create maps at runtime and add after them to the tags? Click to expand... no i have a list with lots of items and when i click on it a panel will open with about 10 views then i will fill all view tags with a custom TYPE object from the item that was clicked and use all those tag properties when i save the item again so the tag will always change and it will need to hold the custom TYPE object when i click on it. if i will set the tag to something different i will loose the custom type object.
ilan Expert Licensed User Longtime User May 19, 2017 #24 ok never mind i will use a Global object that will hold all those custom types instead of using the tag of the view. thanks and sorry for waking up this old thread ps: if someone will find the solution how to load the view name property please post the code in this thread. thank you Upvote 0
ok never mind i will use a Global object that will hold all those custom types instead of using the tag of the view. thanks and sorry for waking up this old thread ps: if someone will find the solution how to load the view name property please post the code in this thread. thank you