Questions tagged [combo-box]

a control in a form that allows a user to select more than one value

Filter by
Sorted by
Tagged with
2
votes
2answers
358 views

Using two Python Addin Combo Boxes to choose feature class first then field from chosen feature class?

Last night a student from my Udemy course about writing Python AddIns asked for: some tips for using a combo box to filter another combo box. What I am trying to do is use a combo box to select ...
1
vote
0answers
51 views

How to fill a field with comboBox.currentText()

Basically, I want to create a widget plugin (QGIS 3.x) in which any user can choose a standard text from a combo box and, after press a ok button, enable a layer for editing and calls the add feature ...
1
vote
1answer
61 views

Value of a ComboBox within a QGroupBox (in a form) by using pyQT5

In QGIS3 I would like to get the current form-value of a ComboBox, that is within a QGroupBox (in the form). I would like to get that value by using PyQT5. Has anybody an idea?
1
vote
1answer
70 views

Get the whole path and name of selected layer from QcomboBox in QGIS plugin

I am creating a temporary plugin for QGIS using the QGIS plugin builder plugin. Aim is to learn how to make plugins in QGIS. I have added two comboBoxes that allows the user to select a vector layer ...
1
vote
1answer
35 views

Using two Python Addin Combo Boxes to choose Folder then Layer

I am trying to create a Python add-in for ArcMap for users to quickly select layer files from within several different folders. This will require 2 combo boxes. User selects the folder from the first ...
2
votes
1answer
76 views

Filtering by multiple attributes in QGIS

I have a layer that contains multiple attributes in multiple fields that I would like to select between without needing to type out a query each time. I am able to do this with extract by expression,...
1
vote
3answers
1k views

Clearing Combobox in Python Addin?

I'm using ArcGIS 10.2.1 and have written an Python addin with multiple comboboxes and an "Unselect" button. The comboboxes run queries on the data and the button clears the selections. I need the "...
2
votes
1answer
100 views

Connecting ComboBox and pushButton for QGIS plugin

I am creating a QGIS plugin. I have added a combo box and a push button in the plugin. The issue that I am facing is that I want the ComboBox to either allow selection of layers from the layers ...
1
vote
0answers
28 views

Qgis python ComboBox: Combination of fixed and free Items

I want to built a ComboBox to select a given plotting scale out of a list or ask for a different scale (e.g. '1:625') as Textinput in the same ComboBox. The combobox is changed to 'editable' and I'm ...
3
votes
1answer
41 views

PyQGIS - how to override maximum number of features in combobox

Is there a simple way, how to override a maximum number of displayed features in QgsFeatureListComboBox? It seems that there is a hardcoded limit set to 100 features (in QgsFeatureFilterModel). ...
0
votes
2answers
2k views

Dynamically adding items into one python addin Combobox from another?

I have two combo boxes. I am trying to add items dynamically into the second combobox from the first combobox's onSelChange(self, selection) event. due to some reason, this is not working. Here is my ...
0
votes
1answer
64 views

How to avoid ArcMap Python add-in combobox drop-down menu obscuring subsequent UI elements?

My ArcMap (10.5.1) Python add-in uses a combobox. When an item is selected from the combobox's drop-down menu, the expected actions are executed successfully. Sometimes these actions actions can ...
0
votes
0answers
191 views

Create a combobox in qgis plugin to input text (string)

I'm developing a plugin in QGIS, with a dialog box where I want to insert text (string) and send to web service soap. I don't found much on the internet. Except this code that i have adapted: qid = ...
1
vote
1answer
43 views

How to modify combo boxes lists in .esriAddIn, with no access to Visual Studio or SDK

I have an .esriAddIn project made for ArcGIS 10.0, and I want to modify the combo boxes lists with up-to-date values. My organisation has moved forward with Visual Studio 2013, ArcGIS 10.3, and ...
1
vote
2answers
118 views

Pythonaddins combobox advanced functionality

I made an Add-in for ArcMap that shows important news for our company. It is actually a toolbar with combobox and refresh button. It loads news from a text file located in our server and as every user ...
0
votes
1answer
192 views

Python Add-In Combo Box Not Working Properly

I am trying to create a python add-in toolbar with a combo box that lists all of the [SITE_NUMBER] values in my "Site Inspection" polygon layer. The user should be able to select a [SITE_NUMBER] ...
2
votes
1answer
392 views

PyQGIS - ComboBox - update selection in procedural programming

I have a polygon shapefile (p_cities) and I want to present a simple GUI to the user to select a city from a combobox and that city will be highlighted & zoomed in. The following code does it ...
1
vote
0answers
35 views

Value maps (comboboxes) doesn't follow when exporting to .qlr (layer definition)

I added value maps (comboboxes) to some fields in QGIS 2.18.15 but when exporting to .qlr (layer definition) the comboboxes doesn't follow. Any idea why?
4
votes
1answer
963 views

Binding value from QComboBox in QGIS custom Form?

I am trying to build a custom form for field data collection (bird species) with some python logic. The python code inserts values into a QComboBox: At the beginning of the list it adds the twenty ...
1
vote
0answers
460 views

Unable to store comboBox value via QLineEdit ('list' object has no attribute 'setText')

I am trying to create a QGIS custom form which allows users to select a value (name) among others in a comboBox, and saves said value with its corresponding code (taken from another table in the ...
1
vote
2answers
244 views

Debugging Global name ''QgsMapLayerComboBox' is not defined?

I try to develop little plugin for Qgis. I used custom widgets in QT that comes with QGIS 2.18 and loaded QgisMapLayerComboBox. But when I reload my plugin in QGis it gives me an error: 2018-01-...
3
votes
1answer
175 views

Adding Combobox to Python Toolbox tool dialog?

I am trying to create a Python Toolbox tool which is supposed to add two fields State and StateAbb to selected Shapefile from selected combobox. How I can add a Combobox which contains a list of US ...
3
votes
0answers
73 views

Using QGIS comboManager to access attributes from PostGIS

I have been tasked with creating a plugin in QGIS that would connect to a PostGiS database, then let the user (based on its user ID) read the attributes of a table for a particular field, then choose ...
1
vote
0answers
204 views

How to fill multi combo box in pyqgis?

I want to select raster layers by a GUI, so I designed a form by Qt designer that can add raster layers in 5 combo boxes. I want when a user select first raster layer in first combo box, and then user ...
1
vote
1answer
2k views

Adding attribute list to combobox in QGIS plugin?

I am developing a simple plugin at the moment which contains 3 combo boxes: comboBox_1 comboBox_2 comboBox_3 Combobox 1 & 2 lists the vector layers available, however I would like the 3rd ...
0
votes
2answers
57 views

Get text from user with pythonaddin

I'm trying to figure out the best way to get text input from a user through a pythonaddin. After watching this video it appears that a editable combo box is an option, but it's maybe not ideal due to ...
2
votes
2answers
664 views

How can I get the first selection of a layer in a QgsMapLayerComboBox?

I'm developing a very simple QGIS plugin to calculate raster average by using GDAL. It uses a QgsMapLayerComboBox and a filter to select only raster layers. However, it needs to select twice a layer ...
4
votes
2answers
2k views

QComboBox nested within a Qmenu?

Is it possible to nest a QComboBox inside of a Qmenu within QGIS? Below is my current code and an associated screenshot with the unexpected results. (orange = current incorrect placement, green = ...
0
votes
1answer
777 views

Creating if-else condition with ArcGIS API for JavaScript combo boxes?

I have an ArcGIS JavaScript API Web App that uses multiple combo boxes. I would like to create an if-else conditional statement between two fields in my feature layer. If one field is chosen in ...
1
vote
1answer
678 views

Add-In Combo Box: populate with specific field's values and pass selection to select by attribute

I checked Passing Selection from Combo Box into Definition Query using Python AddIn?, but I am still stuck on code/syntax. I created a simple add-in with a button that clips and exports tax parcels ...
3
votes
1answer
3k views

Passing Selection from Combo Box into Definition Query using Python AddIn?

I am trying to pass the users selection into a definition query in an addin combo box python script. Basically, I have a feature class with a field called "SITE". I build a python list from that ...
-1
votes
1answer
930 views

Populating a combobox with names of fields in a feature class [closed]

I have to dynamically populate a ComboBox in an add-in tool for ArcObjects using C# with the names of the fields containing text data in the feature class. I know I have to obtain the names from the ...
1
vote
1answer
587 views

Multi-selection from Combo box in Python AddIn?

Is it possible to select more than one option from a combo box list in python Add ins for ArcGIS 10.x? Here is part of the code: def onFocus(self, focused): if focused: self....
0
votes
1answer
222 views

ArcPy Python Addin Combobox How to leave a if-loop, when selection is found

ArcPy Combobox How to leave a if-loop, when selection is found I developed a Combox which: combines values from different featurelayers the User can select an ID or activitycode (acode) the active ...
1
vote
1answer
505 views

Making combobox with list of fields (from layer also selected in combobox) in pyQGIS? [duplicate]

I am new to python and pyqqis. I do not have the methods defined in initGUI how do I do? layers = self.iface.legendInterface().layers() layer_list = [] for layer in layers: layer_list.append(...
1
vote
1answer
607 views

Field list in combobox in pyqgis

I'm new to pyqgis and I'm tryig to make a combobox with list of fields (from layer also selected in combobox). layers = self.iface.legendInterface().layers() layer_list = [] for layer in ...
1
vote
1answer
465 views

Refreshing Python AddIn combobox => TypeError: unbound method refresh() must be called with <class> instance as first argument (got nothing instead)?

I have created a minimalist test Python AddIn using ArcGIS 10.4.1 for Desktop, with a toolbar and two comboboxes on it. The code (TestAddIn_addin.py and config.xml) appears at the bottom of this ...
2
votes
1answer
2k views

Refreshing Combobox of Python Add-in of ArcPy?

I need to refresh the value in the combobox after an event from other tool in the same add-in (ARCGIS 10.1. Python). I've changed the value of the combobox with the code: combobox.value = val and ...
1
vote
1answer
781 views

Add and remove map layers using radio buttons

I've struggled to use radio buttons to toggle multiple map service layers. So far it's fine to add but I can't then add another map service and remove the previous at the same time - I just can't ...
1
vote
1answer
759 views

Dynamically editing items in combobox of Python AddIn?

I'm trying to dynamically edit the list of items in a combobox I made using python add in for a toolbar I'm working on. The list is calculated by another button. Here is the relevant code: class ...
0
votes
1answer
128 views

Unable to populate required data in combobox

I am new in C#, I was given a VB code to migrate in C#. I have done most of it but not able to populate data in COMBOBOX. On clicking the dropdown button, Combobox is blank, on clicking the blank box ...
1
vote
1answer
274 views

Need python code example - setting a combo listbox to Null

I want to be able to set the value of a field to Null using python, but I get an error. I am using arcpy.CalculateField_management
4
votes
1answer
481 views

Clear combo box in ArcMap Python Add-in

Recently created my first Python Add-In for ArcMap. It has been deployed for about a month now and the users like it. There is one thing I want to fix. The Add-in has two combo boxes: In #1 the ...
2
votes
1answer
775 views

Copy first row of attributes and paste for each feature

In a newly digitised polyline vector layer, there are 7 columns attributes value that are choosen inside a value map combo-box that MUST be exactly the same for every newly digitised line (I choose ...
1
vote
0answers
197 views

How to use QGIS ComboManager inside my plugin?

Could someone provide some detailed instructions (for very new beginners!!) on how to integrate combomanager in another plugin? What I have tried (maybe wrong way of doing it!!...): First I ...
3
votes
1answer
141 views

Python Addin Wizard Combobox scripting help with zooming to selection

I am coding an addin to allow me to use 3 comboboxes to select specific regions within a state. Once these are all selected in the comboboxes I need a final button to zoom to the selected area, ...
1
vote
1answer
587 views

Duplicate values in combobox in QT Designer form

I have a custom form created with QT Designer on which I have several comboboxes among other stuff. All the fields have the correct names corresponding to the database. But something weird and ...
1
vote
1answer
96 views

QGis2.8 ValueMap: Why is the first row of my ComboBox empty?

I define a field of a vector layer as ValueMap. I define the values manually, then the feature attribute dialog appears with the combobox. But the first row in my combobox is empty. I use QGis2.8. In ...
3
votes
1answer
797 views

Number of items in a Combo Box

I'm developing a Combo Box for an ArcMap toolbar, that at present simply lists all of the layers that are in the table of contents. However the height of the drop-down menu is very small, and I cannot ...
2
votes
1answer
2k views

QT Designer form - Combobox stores value but doesn't display it

I have a custom form created with QT Designer on which I have several comboboxes among other stuff. All the fields have the correct names corresponding to the database. One of these comboboxes has a ...