Skip to main content

Is there any way to know, from within the contained component in a tab widget, when the component is visible (I.e. when the tab value on the other component is changed). 

I have contained component which I would like to refresh/instanciate when the tab is clicked, but not before. 

trigger getfocus only fires when the contents of the tab is clicked, not when the tab widget itself has it's value changed to show the item. 

The contained component is used by several different 'parent' components, and I would rather not have to alter the tab widget valuechanged trigger on all of them to include some 'instanciate' message. I'd rather the contained component knew when it was visible automatically. This would allow adding it to other parents without having to have secret knowledge of how to configure it. 

Regards, 

Iain



------------------------------
Iain Sharp
Head of Technical Services
Jonas Metals Software Limited
Sheffield GB
------------------------------

Is there any way to know, from within the contained component in a tab widget, when the component is visible (I.e. when the tab value on the other component is changed). 

I have contained component which I would like to refresh/instanciate when the tab is clicked, but not before. 

trigger getfocus only fires when the contents of the tab is clicked, not when the tab widget itself has it's value changed to show the item. 

The contained component is used by several different 'parent' components, and I would rather not have to alter the tab widget valuechanged trigger on all of them to include some 'instanciate' message. I'd rather the contained component knew when it was visible automatically. This would allow adding it to other parents without having to have secret knowledge of how to configure it. 

Regards, 

Iain



------------------------------
Iain Sharp
Head of Technical Services
Jonas Metals Software Limited
Sheffield GB
------------------------------

So, after a lot of prodding about, it looks like the answer is "No". 

I have had to alter the valuechanged trigger of the tab widget on the parent forms to fire an operation on the contained form when $componentname(tab_widget) = "MY_COMPONENT".  Functional but unsatisfying. 

Iain



------------------------------
Iain Sharp
Head of Technical Services
Jonas Metals Software Limited
Sheffield GB
------------------------------

So, after a lot of prodding about, it looks like the answer is "No". 

I have had to alter the valuechanged trigger of the tab widget on the parent forms to fire an operation on the contained form when $componentname(tab_widget) = "MY_COMPONENT".  Functional but unsatisfying. 

Iain



------------------------------
Iain Sharp
Head of Technical Services
Jonas Metals Software Limited
Sheffield GB
------------------------------

I didnt really see a good solution... I considered the trigger onTabButton instead of altering valuechanged, but not sure if it helps or not.



------------------------------
Osman Shariff
Freelance Uniface Consultant - France

Private message me if you need help with a project
English, French, German
------------------------------

I didnt really see a good solution... I considered the trigger onTabButton instead of altering valuechanged, but not sure if it helps or not.



------------------------------
Osman Shariff
Freelance Uniface Consultant - France

Private message me if you need help with a project
English, French, German
------------------------------

Yeah, onTabButton is fired when you have the little X buttons on the tab, and is typically used to close out the component and delete the item from the tab valrep. Not consistent with "The component is in a tab which just displayed it", which is more what I was looking for. 



------------------------------
Iain Sharp
Head of Technical Services
Jonas Metals Software Limited
Sheffield GB
------------------------------