jahlxx Posted July 16, 2016 Posted July 16, 2016 Hi. When I direct set a value to a uninumberedit, the onchange event don't raise. If I tipe a velue, yes, but if I change its valur from code (ie.: x := 3), the event doesn't raise. I forgot something? Thanks.
Sherzod Posted July 21, 2016 Posted July 21, 2016 Hi, For now you can use this: function dirtychange(sender, isDirty, eOpts) { // } Best regards.
jahlxx Posted July 21, 2016 Author Posted July 21, 2016 I'm trying. I put: function dirtychange(sender, isDirty, eOpts){ unilabel2.caption := 'Hello';} but reise an error. can you put a sample please? thanks.
Sherzod Posted July 21, 2016 Posted July 21, 2016 Try: function dirtychange(sender, isDirty, eOpts) { sender.fireEvent("change", sender) }
jahlxx Posted July 22, 2016 Author Posted July 22, 2016 sorry, don't work. I supouse that "change" is the is the onchange event of the uninumberedit, isn't it?
jahlxx Posted January 3, 2017 Author Posted January 3, 2017 Sorry, but I can't make this to work ok. I don't know why the onchange event doesn't raises. Thanks.
Administrators Farshad Mohajeri Posted January 3, 2017 Administrators Posted January 3, 2017 Use OnValueChange event
Sherzod Posted January 9, 2017 Posted January 9, 2017 Hi, For now try to use this: UniNumberEdit1.JSInterface.JSCall('setValue', [100]);
Administrators Farshad Mohajeri Posted January 9, 2017 Administrators Posted January 9, 2017 sorry. same result. don't work It should work in build 1352.
Administrators Farshad Mohajeri Posted January 9, 2017 Administrators Posted January 9, 2017 OK I fixed it.
jahlxx Posted January 11, 2017 Author Posted January 11, 2017 I think that the changevalue event raises just before the value changes. This behaviour, I think is not correct.
Sherzod Posted January 11, 2017 Posted January 11, 2017 I think that the changevalue event raises just before the value changes. This behaviour, I think is not correct. Hi, Sorry, what do you mean? Can you explain how it should be ?! Best regards.
jahlxx Posted January 11, 2017 Author Posted January 11, 2017 I'm experiencing some extrange behaviour with this, Attached is a sample project. In the sample,works ok, but if you remove the UniNumberEdit1Change procedure, doesn't work as expected. Thanks. test.zip
Sherzod Posted January 11, 2017 Posted January 11, 2017 Hi, Thanks for the test case, need to analyze... But, of course, you can use one event hadler for two events for now: procedure TMainForm.UniNumberEdit1Change(Sender: TObject); begin Edit1.text := 'value ' + uninumberedit1.text; end; OnChange -> UniNumberEdit1Change, OnChangeValue -> UniNumberEdit1Change
Administrators Farshad Mohajeri Posted January 12, 2017 Administrators Posted January 12, 2017 I'm experiencing some extrange behaviour with this, Attached is a sample project. In the sample,works ok, but if you remove the UniNumberEdit1Change procedure, doesn't work as expected. Thanks. If you remove UniNumberEdit1Change the events will not be sent to the server each time user presses a key. Changes will be available only when an event is generated on the client. You don't need to use OnChangeEvent. Just put something like a OK button or APPLY button to get values from Form when user has finished editing.
jahlxx Posted January 12, 2017 Author Posted January 12, 2017 Ok. The only way to do this works as I need is put the necessary code in the onchangevalue of the component, and in the onchange event, put something. A blank commented line is enough. With this (extrange for me), works ok, and the onchangevalue event works. Thanks.
Administrators Farshad Mohajeri Posted January 12, 2017 Administrators Posted January 12, 2017 Why do you need to monitor changes on each key press?
jahlxx Posted January 12, 2017 Author Posted January 12, 2017 For example, in a form, I type the customerId. If the curtomerid changes, I have to query from the database the payment terms, default address, etc. In vcl apps, I do this operation in the onchange event. Here, with unigui, I do the the same, but with onchengevalue.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now