MapInfo Pro Developers User Group

Welcome to the MapInfo Pro Developers community!  We are a group dedicated to the discussion and understanding of MapBasic and .Net MapInfoPro AddIn development. Bring your questions and ideas here. This group includes several members of the Pro development team from around the world.

Please feel free to start a discussion in the discussion tab or join in a conversation.

Product Information  Ideas Portal  MapInfo Community Downloads

Discussions

Members

Resources

Events

 View Only
  • 1.  github.com

    Employee
    Posted 02-21-2018 07:17
      |   view attached

    I created a small sample application showing how to work move elements from one ListBox to another.

    The sample code can be found here on Github: https://github.com/PeterHorsbollMoller/mbListInDialogExample

    In the dialog you can select a continent from the PopupMenu which will polulate the first Listbox with the countries of the selected continent.

    Double click on the countries to move them from one Listbox to another.

    See Attachment

    The values in the ListBoxes are stored in arrays and the sample code is using the ARRAYLib from the Common MapBasic Libraries to add, remove and find elements in the arrays.

    By wrapping functionality into procedures/functions you are able to make your code a lot more readable. So everytime you are writing a pieve of code that you are using more than once, consider putting it into its own function/procedure.



  • 2.  RE: github.com

    Employee
    Posted 02-21-2018 02:18

    PS: You can of course extend the application to use MultiListBoxes and also have buttons to move the selected elements.