Forum Stats

  • 3,851,566 Users
  • 2,263,999 Discussions
  • 7,904,781 Comments

Discussions

Dynamically setting the size of a popup

Jeremy Webb
Jeremy Webb Member Posts: 259 Blue Ribbon
edited Aug 8, 2013 10:10AM in APEX Discussions

Hi,

I have a number of places in my current application where I require differing size popup windows. Rather than setting the size of them hardcoded, I thought it would be really cool to have a generic function to open the popups which worked out how wide the popup window should be based on the content of the region.

Each popup is only one region wide, and this region is a form region all of the fields which sit on the same line. So my theory was

1. Calculate the sum of the field widths

2. Calculate the sum of the label lengths

3. Add an additional amount to account for padding etc.

Then these 3 would give me a width to ensure that the popup was set to.

Part 1 completed fine, querying APEX_APPLICATION_PAGE_ITEMS and getting the ITEM_ELEMENT_WIDTH.

Stuck on part 2, because in the above table the LABEL column is always null. Any ideas where I can find the label text for each item so that I can check the lengths of the labels?

As usual, any help gratefully received.

Jez

Tagged:
Jeremy Webb

Answers

This discussion has been closed.