MoraleC2
Member
I am building a report screen with a SQL table display, and I want to be able to adjust the time range from which data are pulled (something I could do in my sleep if I were working with Ignition). I figured the easiest way for the operators would be to use a DatePicker object from .NET. So I made window variables for start and end date (strings), which are used to build the SQL query, and animated the Text property of the DatePickers to those variables.
However, when I choose a new date through the DatePicker, it does not update the associated variable. It's a similar problem to what I encountered when trying to control a variable with a ComboBox, but that was solved with an event script. The DatePicker is not as straightforward; there's no "OnDateChange" method or anything for me to invoke, as far as I know.
Can anyone give advice on how to properly link a .NET object with a window variable in iFix? I must be missing something.
Edit: Nevermind; the CalendarClosed event can be used to assign the new text value to the window variable. Problem solved.
However, when I choose a new date through the DatePicker, it does not update the associated variable. It's a similar problem to what I encountered when trying to control a variable with a ComboBox, but that was solved with an event script. The DatePicker is not as straightforward; there's no "OnDateChange" method or anything for me to invoke, as far as I know.
Can anyone give advice on how to properly link a .NET object with a window variable in iFix? I must be missing something.
Edit: Nevermind; the CalendarClosed event can be used to assign the new text value to the window variable. Problem solved.
Last edited: