Project

General

Profile

Feature #972

Add Position Setting within WDialog

Added by V.E.O V.E.O almost 11 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
08/31/2011
Due date:
% Done:

0%

Estimated time:

Description

Hi,

I used WDialog in my project to popup a form or a table.

I noticed WDialog is parentless, and in style sheet, its "position: fixed".

But if the content is beyond the scale of screen, part of the dialog would be overrided.

I tried add a overflow to .Wt-dialog, but in polished theme horizontal scroll bar will always appear, due to the drop_shadow outset.

Now I change its "postion" to "absolute". Still need some job to adjust its "top" not to be negative.

Can we make a initial position setting for WDialog, and set if it's fixed or attached to parent Container?

P.S. WScrollArea not working in a WDialog yet.

Best Regard,

V.E.O

#1

Updated by Koen Deforche almost 11 years ago

  • Status changed from New to Feedback
  • Assignee set to Koen Deforche

Hey,

You can position a dialog at a different location, using WWidget::setOffsets(). I'm not sure that I understand what is wrong with Fixed versus Absolute positioning --- do you actually want the dialog to be bigger than the screen ?

WDialog also got a new API, setResizable() so that the user can resize the dialog.

To avoid that the dialog becomes too big, you can for example specify a size for the entire dialog (e.g. resize("70", "70") and use a layout manager to constrain the contents (or make the contents overflow with scrollbars).

I'll need to check on WScrollArea --- what behaviour are you seeing and where do you put the scrollarea, and what layout manager do you use ?

Regards,

koen

#2

Updated by Koen Deforche almost 11 years ago

  • Target version changed from 3.1.11 to 3.2.0
#3

Updated by V.E.O V.E.O over 10 years ago

Hi,

I made a WDialog showing one table of data, in some situation, the height of WDialog exceeds the visual height of browser, and no scroll bar appear. With Fixed changed to Absolute, WDialog can be dragged elsewhere and scroll to see the whole content.

I placed WScrollArea in the contents of WDialog. I don't know if make it correct, layout is not used.

In Firebug, I manually set overflow property on the content of WDialog, but it seems to be override by WDialog's javascript code.

Great work on new API setResizable!

Best Regards.

V.E.O

#4

Updated by Koen Deforche over 10 years ago

Hey,

You really should be using a layout manager in the dialog contents if you want to fit the contents inside the dialog's foreseen size, and overflow properly if it doesn't fit.

Regards,

koen

#5

Updated by Koen Deforche over 10 years ago

  • Status changed from Feedback to Resolved

Closed assuming people follow my advice :-)

#6

Updated by Koen Deforche over 10 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF