02-14-2006 10:28 AM
Hi, my purpose is to define a table that has two columns, one contains channels names found in a file and the other column is defined as a ComboBox type in order that the user can chose what to do with this channel… (in this case to choose Front or Rear)
To do this I defined in a VAS file two variables as follows:
ChannelsNames_ : F [100]
OffsetType_ : A ('Front', 'Rear') <'Front'>
I have no problems to pass the ChannelsNames_ variable to the table, but I don’t find out how to manage to pass the variable to the column defined as a ComboBox…
Please some suggestions will be appreciated,
Thanks in advance,
02-15-2006 02:34 AM
02-15-2006 08:23 AM
Hi, thanks you are right I saw the mistake this morning... but I still having problems, hope you can continue helping me:
Now the problem is how to modify the value when the user selects “Front” or “Rear”…
What I mean is that for the Channels Names I do the following:
For i=1 To CNo("Free")-1
ChannelsNames_(i) = Cn(i)
Next
Now the problem is that when the user modifies the value in the column defined as a ComboBox I have to catch if “Front” or “Rear” is selected and to store the new value in the variable OffsetType_ and I don’t know how to do it. I know how to find the selected cell, but not the selected value of the ComboBox cell.
I will appreciate your help again.
Thanks,
Marc.
02-15-2006 08:43 AM
02-15-2006 10:06 AM
Thanks for the try, but I think that you didn’t understood my problem, I'll try to explain it better:
Now the table shows the found channels in one column and in the other you can chose / select “None”, “Front” or “Rear” (I added one more item) in the ComboBox cells. Thing is that when user chooses a new value is not stored directly into the OffsetType_ and the variable remains with the original value. Then to store the chosen option by the user (None”, “Front” or “Rear”) into the OffsetType_ I need to know the line selected on the ComboBox and I don’t find the way to do that due that is inside the table…
Using SelColumn and SelRow or using SelectedCells I can locate the cell that is being modified but how can I know the chosen line or value of the ComboBox inside the cell? Knowing this I can store the value into the corresponding OffsetType_(i).
Hope it’s clear now, and you can help me, if not we will try again,
Thank you very much.
02-16-2006 02:38 AM
02-16-2006 05:50 AM
It isn’t my problem…
Ok, I think that if you check the attached code that as you will see it's very simple... In your screen will appear a dialog showing a table with one column and each cell contains a ComboBox. The column is assigned to the OffsetType_() variable that we are talking about... If you select any cell you can go into the ComboBox options, but there is no way to select any of the possible options. The value of the cell remains as it was at the beginning, and then of course when you exit the dialog... nothing happens...
Is this a DIAdem bug? or we are forgetting something?
Or how we can know the line of the ComboBox that the user is selecting?
Please try,
02-16-2006 06:39 AM
ok, i see your problem:
For each column in your tabel you can chooes a option called "read only".
If the checkbox ist set, the column appears grey and you can not change a value in this column.
Clear the checkbox and the column then is no longer grey.
🙂
02-16-2006 07:57 AM
Thank you very much Andreas, finally you solved my problem... you are the Best :))
I'm using DIAdem 8.1 because most of my collages have this version and they will use my code. How DIAdem 8.1 doesn’t show the table in grey if it's "read only" I didn’t realise about my mistake. When I did the example for you I used DIAdem 9.1 that actually I only use to make colourmaps, I saw the table in grey colour but I was on a hurry and thought is not important... but not that was the key of my problem…
Thanks again Andreas,
Marc.