Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
Stuffing the Default for a control
Hi all,
Hopefully this is something very simple; but I haven't been able to find how to do this. When I land on a given control (like an editline), I want to be able to stuff the "default" for that control at Gotfocus. I can stuff Defprop, Text, Invalue, etc., but that doesn't quite get me what I need. I'm talking about what you find in the default in the properties dialog for a control (i.e. DATETIME or a literal, etc.)
The DEFAULT property is associated with the current @Window and is the control (button) that clicks when you press Enter. DEFPROP is the content of the control. Is there a property that contains the default for a given control? How/can that be manipulated?
Thanks in advance!
Michael
Hopefully this is something very simple; but I haven't been able to find how to do this. When I land on a given control (like an editline), I want to be able to stuff the "default" for that control at Gotfocus. I can stuff Defprop, Text, Invalue, etc., but that doesn't quite get me what I need. I'm talking about what you find in the default in the properties dialog for a control (i.e. DATETIME or a literal, etc.)
The DEFAULT property is associated with the current @Window and is the control (button) that clicks when you press Enter. DEFPROP is the content of the control. Is there a property that contains the default for a given control? How/can that be manipulated?
Thanks in advance!
Michael
Comments
We have a function called WIN_DEF that we use. It programmatically checks to see what control has focus and then dynamically calls our "default" logic as needed. This eliminates the need to have a custom function for each control.
I have the Default function as you specified, and I know how to call it from an Editline, for example. But is there a way to call from a Combobox? The defaulting functionality doesn't seem to be the same; and when I try to put the function call in the custom function default, it won't save the change.
Why do I always find these gems? lol
Thanks!
Michael
If I populate the List programmatically, how can I programmatically say which will show as a default?
I could replace the combo box with an editline and an option button but I'll have to rewrite some code.
The combo box is defined as dropdown, not simple or dropdown list.
You seemed to be acquainted with the edit line default logic in your original post when it comes to common things such as dates, times, etc. Thus, it never occurred to me that you were trying to emulate AREV (which is a mistake, IMO). As always, right tool for the right job. However, given that I don't really know the full requirements for this project I can't advise if this is the best way to go. Thanks. However, given the other news this is somewhat moot now.
Thanks for your help sir