Page 1 of 1

Delivery Address read only, allow ellipsis

PostPosted: Tue Oct 20, 2020 11:25 pm
by DannyC
I'm wanting to write a plugin to make the sales order delivery addresses read only but allowing the selection via the ellipsis button so that the user can choose the addresses from the debtor, but not edit.
I know I can use the Set Permissions on the sales order tab and pick those fields and set to read only.

I can also write a plugin and say txtDeliveryAddress2.Enabled = false and so on for each field. Either way works OK.

But the first field is DeliveryAddress1EditableLookup and if I make it read only, the dot-dot-dot is read only also.

Can I have the address selection ellipsis work whilst keeping the text read only?

cheers

Danny

Re: Delivery Address read only, allow ellipsis  Topic is solved

PostPosted: Wed Oct 21, 2020 6:30 am
by SBarnes
Ok, you are looking at DeliveryAddress1EditableLookup which is a JiwaFinancials.Jiwa.JiwaApplication.Controls.EditableLookup which you want to behave as a JiwaFinancials.Jiwa.JiwaApplication.Controls.Lookup, you can't change the control so you need to disable the actual textbox of the control and not the control itself as that disables everything sitting within the control, the following code will do that but whether or not the control will behave as expected you will have to test but I am pretty sure the attached plugin will do what you want.

Code: Select all
DeliveryAddress1EditableLookup.UltraTextEditor.Enabled = false;

Re: Delivery Address read only, allow ellipsis

PostPosted: Wed Oct 21, 2020 1:52 pm
by DannyC
Perfect.
It was the .UltraTextEditor element I was missing.

All good.

Re: Delivery Address read only, allow ellipsis

PostPosted: Wed Oct 21, 2020 1:58 pm
by SBarnes
Wasn't hard JiwaFinancials.Jiwa.JiwaApplication.Controls has all the controls including JiwaGrid in it if you ever need to see how the controls work.