# Anyway to make drop down table bigger for touchscreen projects?

**URL:** <https://forum.inductiveautomation.com/t/anyway-to-make-drop-down-table-bigger-for-touchscreen-projects/15045>\
**Category:** Ignition\
**Created:** [August 11, 2017, 4:50pm UTC](https://forum.inductiveautomation.com/t/anyway-to-make-drop-down-table-bigger-for-touchscreen-projects/15045 "2017-08-11T16:50:46Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 27, 2018, 4:17pm UTC](https://forum.inductiveautomation.com/t/anyway-to-make-drop-down-table-bigger-for-touchscreen-projects/15045/5 "2018-03-27T16:17:52Z")

</div>

> [@nminchin](#):
>
> How can I pass in the target component to access the size of it? I also want to pass in a height factor so that I can increase the height if needed.

There are many different ways to do this - here's where I would probably start (if you just want to pass in that scale factor dynamically):

```auto
from com.inductiveautomation.factorypmi.application.components.PMIComboBox import DataSetListCellRenderer
from java.awt import Dimension

class BigDSRenderer(DataSetListCellRenderer):
	def __init__ (self, target, scale):
		DataSetListCellRenderer. __init__ (self, target)
		self.scale = scale

	def getListCellRendererComponent(self, list, value, index, isSelected, cellHasFocus):
		component = DataSetListCellRenderer.getListCellRendererComponent(self, list, value, index, isSelected, cellHasFocus)
		component.setPreferredSize(Dimension(event.source.width, event.source.height * self.scale))
		return component

target = event.source.parent.getComponent('Dropdown 1')
target.setRenderer(BigDSRenderer(target, 2))

```

What this does is override the ` __init__ ()` method on the `BigDSRenderer` class. _Technically_, there is no ` __init__ ()` method on the original Java class (Java classes work differently to Python, using overloaded constructors) but Jython translates the Java method's initialization into the ` __init__ ()` form for use with Python. So, we define `BigDSRenderer` to have it's own custom `init` method - but the very first thing it does is call `DataSetListCellRenderer`s ` __init__ ()` method. This is one way to call the superclass' instantiation method (meaning it's still going to do everything that the original class did, which we want). Then it's going to take the additional argument we gave the constructor (scale) and assign it to a variable on the instance.

Then when we create an instance of the `BigDSRenderer` class, it expects _two_ arguments - the target, and the scaling factor.

Disclaimer(s):  
I haven't actually tested this modification, though I've done the same thing in many different areas, and some of my terminology may be slightly off (I'm mostly self-taught at this).

---

_[View the full topic](https://forum.inductiveautomation.com/t/anyway-to-make-drop-down-table-bigger-for-touchscreen-projects/15045)._
