Joernh Posted February 15, 2006 Report Share Posted February 15, 2006 Hi there, can anybody acknowledge, that it is not possible to change the names of tabs programmatically during runtime?! My attempts failed. I'd also like to know if it's possible to add or remove tabsheets? Thanks for Reply Regards Joern Quote Link to comment
WMassey Posted February 15, 2006 Report Share Posted February 15, 2006 Hi there,can anybody acknowledge, that it is not possible to change the names of tabs programmatically during runtime?! My attempts failed. I'd also like to know if it's possible to add or remove tabsheets? Thanks for Reply Regards Joern When I try to rename a tab control's page "pagelabel" from the VI that contains the tab control I get this error: "Error 1073 occurred at Property Node (arg 1) in Untitled 1 Possible reason(s): LabVIEW: This property is writable only when the VI is in edit mode, or this method is available only when the VI is in edit mode." Since a tab control looks like an Enum whose values are derived from the page labels, it doesn't suprise me very much that it works this way --- you cannot change an enum on the fly either. The same logic could be applied to adding or removing pages, since you cannot expect to add or remove values to an enumerated constant on the fly, you shouldn't expect to be able to do it to a tab control either. FWIW, you should however be able to change it from another running VI just as long as the VI containing the tab control is not running. Quote Link to comment
Wolfram Posted February 15, 2006 Report Share Posted February 15, 2006 When I try to rename a tab control's page "pagelabel" from the VI that contains the tab control I get this error:"Error 1073 occurred at Property Node (arg 1) in Untitled 1 Possible reason(s): LabVIEW: This property is writable only when the VI is in edit mode, or this method is available only when the VI is in edit mode." Since a tab control looks like an Enum whose values are derived from the page labels, it doesn't suprise me very much that it works this way --- you cannot change an enum on the fly either. The same logic could be applied to adding or removing pages, since you cannot expect to add or remove values to an enumerated constant on the fly, you shouldn't expect to be able to do it to a tab control either. FWIW, you should however be able to change it from another running VI just as long as the VI containing the tab control is not running. There is a way to change the tab captions. See enclosed example. Wolfram Download File:post-1013-1140005841.vi Quote Link to comment
Joernh Posted February 15, 2006 Author Report Share Posted February 15, 2006 When I try to rename a tab control's page "pagelabel" from the VI that contains the tab control I get this error:"Error 1073 occurred at Property Node (arg 1) in Untitled 1 Possible reason(s): LabVIEW: This property is writable only when the VI is in edit mode, or this method is available only when the VI is in edit mode." Since a tab control looks like an Enum whose values are derived from the page labels, it doesn't suprise me very much that it works this way --- you cannot change an enum on the fly either. The same logic could be applied to adding or removing pages, since you cannot expect to add or remove values to an enumerated constant on the fly, you shouldn't expect to be able to do it to a tab control either. FWIW, you should however be able to change it from another running VI just as long as the VI containing the tab control is not running. thanks a lot. Think you hit the nail on the head. Quote Link to comment
Joernh Posted February 15, 2006 Author Report Share Posted February 15, 2006 There is a way to change the tab captions. See enclosed example.Wolfram Hi Wolfram, your example confused me since both properties of the tab-control are described as not changeable when the VI is running. But it works...... :headbang: so...thank you Quote Link to comment
WMassey Posted February 15, 2006 Report Share Posted February 15, 2006 your example confused me since both properties of the tab-control are described as not changeable when the VI is running. But it works...... Hmph, learned something new. :thumbup: It works because you are not replacing the enumerated value used as the page selector. You are just hiding it and instead displaying an independent (cosmetic) string in its place. Quote Link to comment
Rolf Kalbermatter Posted February 15, 2006 Report Share Posted February 15, 2006 Hmph, learned something new. :thumbup: It works because you are not replacing the enumerated value used as the page selector. You are just hiding it and instead displaying an independent (cosmetic) string in its place. This was an addition to LabVIEW 6.1 exactly because you couldn't rename a Tab in a TabControl. Making a TabControl behave like a RingControl instead was no option as that would have caused problems with backwards compatibility and in fact removed some functionality and ease of use from the TabControl. Rolf Kalbermatter Quote Link to comment
Joernh Posted February 15, 2006 Author Report Share Posted February 15, 2006 Hmph, learned something new. :thumbup: It works because you are not replacing the enumerated value used as the page selector. You are just hiding it and instead displaying an independent (cosmetic) string in its place. ....nevertheless, independent label and tab caption are properties described as not changeable during runtime (at least in the german manual), but maybe its a misstake. Thank you all for replying..... :worship: Best regards Joern Quote Link to comment
orko Posted February 15, 2006 Report Share Posted February 15, 2006 ....nevertheless, independent label and tab caption are properties described as not changeable during runtime (at least in the german manual), but maybe its a misstake. In english version (7.1.1) I see this: So looks like you may have a typo over there (or is that a typographischer Fehler?) Joe (orko) Quote Link to comment
Joernh Posted February 17, 2006 Author Report Share Posted February 17, 2006 In english version (7.1.1) I see this: So looks like you may have a typo over there (or is that a typographischer Fehler?) Joe (orko) Hi Joe, maybe there's a difference between 7.1.1 and 7.1 im deutschen manual f Quote Link to comment
Wolfram Posted February 17, 2006 Report Share Posted February 17, 2006 Hi Joe,maybe there's a difference between 7.1.1 and 7.1 im deutschen manual f Quote Link to comment
malef Posted February 17, 2006 Report Share Posted February 17, 2006 Joern, all you wanna do with the Tabs can be done in your LV version. See examples "Tab Control Properties.vi" :2cents: Manfred Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.