Delivery Address read only, allow ellipsis  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Delivery Address read only, allow ellipsis

Postby DannyC » Tue Oct 20, 2020 11:25 pm

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
User avatar
DannyC
Senpai
Senpai
 
Posts: 635
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 29

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

Postby SBarnes » Wed Oct 21, 2020 6:30 am

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;
Attachments
Plugin Sales Form Delivery Test.xml
Delivery Address Plugin
(33.49 KiB) Downloaded 29 times
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1617
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Delivery Address read only, allow ellipsis

Postby DannyC » Wed Oct 21, 2020 1:52 pm

Perfect.
It was the .UltraTextEditor element I was missing.

All good.
User avatar
DannyC
Senpai
Senpai
 
Posts: 635
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 29

Re: Delivery Address read only, allow ellipsis

Postby SBarnes » Wed Oct 21, 2020 1:58 pm

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.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1617
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175


Return to Technical and or Programming

Who is online

Users browsing this forum: Google [Bot] and 4 guests

cron