modo Posted March 21, 2005 Report Share Posted March 21, 2005 Hello I've got a tiny problem with 'String Control'. How can I limit the width of text which user can write in 'String Control'? Many thanks, Peter Quote Link to comment
dkapla2 Posted March 22, 2005 Report Share Posted March 22, 2005 Greetings, I do not know a way to limit the legnth like you would in VB. You could crudely programtically limit the length of the string by setting up the string to update immedately upon writting in it (this way it triggers events upon typing) and then checking the legnth to a value you set. I attached a quickie example of what I mean by this. DAK Download File:post-1884-1111503839.vi Quote Link to comment
Louis Manfredi Posted March 22, 2005 Report Share Posted March 22, 2005 Hi All: I'd add to DAK's suggested vi a beep within the case structure, so the user knows he's getting truncated. I've used similar in user's interfaces in the past, & it seems to work ok. Best Regards, Louis Quote Link to comment
modo Posted March 22, 2005 Author Report Share Posted March 22, 2005 Hello It is crudely way but it is simple and works (... instead of local variable i'd prefer value property node Somehow I don't like to use local variables . Thanks for idea, Peter Quote Link to comment
dkapla2 Posted March 23, 2005 Report Share Posted March 23, 2005 HelloIt is crudely way but it is simple and works (... instead of local variable i'd prefer value property node Somehow I don't like to use local variables . Thanks for idea, Peter 4298[/snapback] It is something I have been wondering is there any difference memory wise between a local variable and the value property node? or is it just a preference from visual languages (VB...) If anyone has any comments about the memory allocations of the local variable vs. the property node I would love to know.... Thanks. Quote Link to comment
modo Posted March 23, 2005 Author Report Share Posted March 23, 2005 Hello For me it is just a preference. If you want to read sth about local variables vs. property node, please look at http://digital.ni.com/public.nsf/3efedde43...47?OpenDocument BTW there was such topic on Programming Discussions > General - "Local Variables or Property Node" Cheers Quote Link to comment
dkapla2 Posted March 25, 2005 Report Share Posted March 25, 2005 HelloFor me it is just a preference. If you want to read sth about local variables vs. property node, please look at http://digital.ni.com/public.nsf/3efedde43...47?OpenDocument BTW there was such topic on Programming Discussions > General - "Local Variables or Property Node" Cheers 4309[/snapback] Thank you very much for that article. I want to mention that article that follows on memory in labVIEW is a must read for programmers (like me) who are trying to hammer down memory and write more efficient code. :beer: Cheers!!! :beer: 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.