Custom field combo box - multiple combo boxes  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Custom field combo box - multiple combo boxes

Postby Atronics » Thu Aug 18, 2016 5:28 pm

Using the sample custom field combo box: If I require multiple combo boxes, how and where do I include the code for additional combo boxes?
Atronics
Frequent Contributor
Frequent Contributor
 
Posts: 119
Joined: Fri Feb 29, 2008 4:40 pm
Topics Solved: 10

Re: Custom field combo box - multiple combo boxes  Topic is solved

Postby Mike.Sheen » Thu Aug 18, 2016 8:14 pm

Atronics wrote:Using the sample custom field combo box: If I require multiple combo boxes, how and where do I include the code for additional combo boxes?


The same place, you just add a condition and branch based on the custom field name.

In the the sample I think you're referring to, you'll see this code in the FormatCell method of the CustomFieldPlugin class:

Code: Select all
If CustomField.PluginCustomField.Name = "SampleCombobox" Then
     ...
End If


So, to cater for an additional combo field, just add an Else If:

Code: Select all
If CustomField.PluginCustomField.Name = "SampleCombobox" Then
     ...
Else If CustomField.PluginCustomField.Name = "SampleCombobox2" Then
    ...
End If


Mike
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 4 guests