# Trying to open a popup using an event script

**URL:** <https://forum.inductiveautomation.com/t/trying-to-open-a-popup-using-an-event-script/97552>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 18, 2024, 8:08am UTC](https://forum.inductiveautomation.com/t/trying-to-open-a-popup-using-an-event-script/97552 "2024-10-18T08:08:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jasper\_Clauwaert](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@Jasper\_Clauwaert](https://forum.inductiveautomation.com/u/Jasper_Clauwaert)\
**Post date:** [October 18, 2024, 8:08am UTC](https://forum.inductiveautomation.com/t/trying-to-open-a-popup-using-an-event-script/97552/1 "2024-10-18T08:08:41Z")

</div>

Hi,

**Context:**  
I'm trying to open a popup using an event script when clicking a component:

```python
def runAction(self, event):
	       system.perspective.togglePopup(
	       id=self.view.custom.PopupID,
	       title=self.view.custom.tag + ' - ' + self.view.custom.description,
	       view='Templates_HighPerformance/Popups/Regulator/PopUp_Regulator_test',
	       params = {'PopupID':self.view.custom.PopupID,'TagPath':self.view.params.tagPath},
           resizable='false',
           position = {'top':event.pageY,'left':event.pageX}
	       )

```

Now when opening this popup it looks like this with a long title:

 ![Screenshot popup](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/b/5b8d3c6925e647c93ac57f717399414377805dff.png)

When using a shorter title it looks like this (how it's supposed to be):

 ![Screenshot popup2](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/0/d0b4743bfd3496db1e0b08a81d10c25a3f58410e.png)

When clicking the button, the popup expands to the right (this works).

**Question:**  
How/where can I edit or add CSS code to hide the title when there is overflow in the header.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [October 21, 2024, 8:38am UTC](https://forum.inductiveautomation.com/t/trying-to-open-a-popup-using-an-event-script/97552/2 "2024-10-21T08:38:45Z")

</div>

The css mention in my reply can be added in the advanced style sheet.css

> **[Style Classes | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.1/ignition-modules/perspective/styles/style-classes#enabling-the-advanced-stylesheet)**
>
> A Style Class is a group of Style settings that are saved together. Style Classes can be applied to multiple components to provide consistency in design. A Style Class enables you to define style elements in one place, and then quickly apply that...
