Stimpson Posted September 14, 2006 Report Posted September 14, 2006 Hello everybody. I have an array on the FP which I filled with 8 Boolean OK Buttons. These represent the single bits in a byte. If you click the Buttons, the value of the boolean array changes from 0-255, you get the idea. Is there a way to disable single OK buttons in this array, so you can only click and change the MSB or LSB or whatever bit you want? I only found an option to disable all OK Buttons in the array. Obviously that's insufficient. See the attachment for more clarification. Regards, Stimpson Download File:post-6155-1158242021.vi Quote
Yair Posted September 14, 2006 Report Posted September 14, 2006 Array elements all have the same properties and appearance, so you can't disable just a single element. What you can do instead is create a cluster of 8 booleans. You can then convert it into an array for your calculation and get the Controls[] property to control the properties of each boolean. Another option would be along the lines of blocking the change, like using a Mouse Down? event and discarding it if it's on a "disabled" button or using a value change event and reseting the values of changed elements if they are "disabled". Personally, I don't like these solutions. If you only need 8 booleans, go with the cluster. Quote
Grampa_of_Oliva_n_Eden Posted September 14, 2006 Report Posted September 14, 2006 ... Personally, I don't like these solutions. ... Same here! The lack of visual feedback makes the user think the application is hung or not responding. Ben Quote
Stimpson Posted September 14, 2006 Author Report Posted September 14, 2006 The cluster works pretty good. Thank you. Another thing popped up though: I want to enter a hex value with a 'control' and this should alter the OK Buttons according to the entered hex value. But at the same time, i want the value of aforementioned 'control' alter accordingly when i click the OK Buttons. In other words: I have two controls that affect each others value. So this gives me troubles when they are executed synchronously. Stacked sequence gives me the problem that it works in only one direction properly. Boy, that sounds complicated as hell while being so basic. Quote
Bob Y. Posted September 14, 2006 Report Posted September 14, 2006 The cluster works pretty good. Thank you.Another thing popped up though: I want to enter a hex value with a 'control' and this should alter the OK Buttons according to the entered hex value. But at the same time, i want the value of aforementioned 'control' alter accordingly when i click the OK Buttons. In other words: I have two controls that affect each others value. So this gives me troubles when they are executed synchronously. Stacked sequence gives me the problem that it works in only one direction properly. Boy, that sounds complicated as hell while being so basic. Maybe you are looking for something like this? Download File:post-1172-1158248591.vi Quote
Stimpson Posted September 15, 2006 Author Report Posted September 15, 2006 Excellent, works very good. Thank you very much. Quote
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.