- Tim Ford
- PowerBuilder
- Thursday, 21 December 2023 04:38 PM UTC
Does anyone know of any way to capture events from a nested datawindow?
We are attempting to provide a new feature that would allow our users greater flexibility in customizing the layout of "freeform" (non-tabular) reports. We already provide our users with a preview of any report prior to printing. Our thought on how to implement this increased flexibility was to have users right-click an object (text, column, or compute) within the report preview and then provide options to resize or move that object anywhere within the confines of the report. This approach is working great for single datawindow reports.
The issue we are running into is that we have many reports with nested datawindow objects (not Composite reports). When an object within one of these nested reports is "right-clicked" on, the parent datawindow successfully captures the rbuttondown event, but the dwobject.Type returned is that of "report", not the actual object within the nested datawindow. I had thought that in this situation where the dwobject.Type is "report", I could simply do a GetChild() on that nested datawindow in order to get a reference to it and then call GetObjectAtPointer() using the reference to the nested datawindow. Unfortunately, GetChild() only works on Composite and Drop-Down datawindows, not truly nested datawindows. If I could get a reference to the nested datawindow, then I think the GetObjectAtPoint() call might work, but I have not yet figured out how to get that reference.
If getting a reference to a nested datawindow is not possible, then can anyone suggest some other way of either capturing an event from a nested datawindow or determining the object under the cursor of a nested datawindow?
Thank you in advance for any advice or ideas!
- Tim
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.