Select to view content in your preferred language

User Input @ Python Add-in

3634
11
Jump to solution
08-26-2016 01:13 AM
Yusuf_CelilKonak
Regular Contributor

Hello everyone,

While searching for how to get any user parameter @ add-in,  i found tkinter but before move forward with tkinter i'd like to ask if is there any other easy way to get user input. Just i want to get text from user and at layout i've text element and add-in button 'll only change element 's text property according to value comes from user. Only issue some kind of gui is needed to show user and get the text  expected. Any walkthrough or sample would be helpful.

Thanks in advance.

11 Replies
Luke_Pinner
MVP Regular Contributor

Sorry to be blunt, but that sounds like a very ugly and fragile way of doing it. If you just want Yes/No/Other, use a MessageBox.

i.e

result = pythonaddins.MessageBox("Press Yes, No or Cancel", "Just do it!", 3)
LukeWebb
Frequent Contributor

I need something that will function on a tool OnRectangle event, feature attributes will then be looped to get unique values, for the user to make a selection.

That was just a simple example for brevity.

I think your toolbox show method should work for this!, one day I will try it out. (Hopefully I can pass something to the toolbox interface to populate data from my selected features!)

0 Kudos