Hi Comunity
The datawindow dropdowns are very convenient for decoding.
Is there a way to prevent the curtain from falling at the click of the mouse?
Thanks in advance for your reply
Hi Comunity
The datawindow dropdowns are very convenient for decoding.
Is there a way to prevent the curtain from falling at the click of the mouse?
Thanks in advance for your reply
Hi Gimmy,
here another approach:
Use a field (column object) to edit (simple edit style) and a different field to display the text (dddw style). An easy way is to use two column objects for the same retrieved column (you may add more than one column object for same column). So you don't need any additional code to show the correct text.
If it is no problem to show the two columns you don't need to do more.
If you want to show only one of the columns you have to write some code to show/hide the columns and switch the column focus in the itemfocuschange event.
HTH,
René
Hi Gimmy,
Can you use standard behavior when you resize the dropdown to show 0 lines/rows?
There are a few ways to still leverage DDDW technology but manipulate it to suit your specific situation:
Option(4) takes significantly more code. That's the con. But it allows you to do pretty much anything. That's the pro.
I would try to adjust properties of the DDDW so it visually appears as you prefer.
HTH /Michael
UPDATE >> I tried a couple of customizations.
Lines in DropDown = 0 results in "default" number of lines. So THAT is no option.
I checked AllowEdit and unchecked Always Show Arrow. Now dropdown still appears when user clicks in the "arrow" part of the item. Click in the "text" part or TAB into the item does NOT display the dropdown. So it is PARTIAL solution.If I had to make a DDDW that NEVER drops down then THIS is what I would do unless someone else knew a hidden property or code trick =>
- Edit Style = Edit; checked Use Code Table; checked Validation.
- At RetrieveEnd or ItemFocusChanged retrieve DropDown data into a DataStore
Copy this dataset into the Edit item's Code Table. That code table behaves very similar to DDDW with data value and display value.- Add code in EditChanged event if find or "prefix search" is required
- Add code in ItemChanged event to handle whatever additional processing is needed beyond data value <=> display value conversion.
Hopefully THIS brings you closer to your goal /Michael
Hi Gimmy,
Have you tried just setting the tab order to 0 and disabling "always show arrow"? It will display the description but you cannot click on it.
HTH
Gerry.
No, you cannot prevent the dddw to display itself when clicking on the arrow. There's an event pbm_dwndropdown which is called just before showing the dddw, but you can only "return 0".
Why don't you write something which uses a datastore instead of the dddw edit style?
You could use the tag attribute of the column to indicate which datastore, description and data field would have to be used.
In the constructor of the dw control you retrieve them all in memory and in the "editchanged" event you do your magic using the corresponding datastore for a specific column.
The only problem I see with this, is that you'd need an extra field or text for the description.
HIH
Hello John
Thanks for your post.
I try to explain myself better.
The DDDWs have the great advantage that by entering the code they decode and display a description (generally decoding) without making any effort.
I want to maintain this automatism, but I don't want it to go down the curtain to display its values when the user clicks on the field.
The idea is to transform the DDDW into a self-decoding field without giving the possibility to view all the records contained in it.
I am imagining an event, a 'return code' or something else that prevents the opening of the dddw to display its contents.
Does anyone have any suggestions?
I hope I was clearer.
Hi, Gimmy -
Would you please explain a little more clearly what you mean by "prevent the curtain from falling at the click of the mouse"? What behavior are you wanting to prevent? When the user clicks where? Have you tried turning off the "Always Show Arrow" property on the Edit tab in the DataWindow Painter?
Regards, John
I can't.
The dddw code ( is an IUD ) while the user has a surrogate code field to use.
The user can enter a code (say "IT") and you want to show a text for the entered code (say "Italy")? And you want to IUD the code? So my approach should work.