Adding a "Terminal App" window to scroll container

Sorry for all the questions guys.

I have noticed that in PhAB under “Project → Add Window…” there is a “Terminal App” window which is ideal for my project.

Does anyone know how this type of window can be created at runtime and have it added to a scroll container.

Again, many thanks.

I have found something that looks like it should work, but I can’t seam to get it working correctly. I currently have:

PtWidget_t *Test_widget_Ptr = NULL;

ApModuleParent( ABM_Terminal_App, ABN_My_Container, NULL );
Test_widget_Ptr = ApCreateModule( ABM_Terminal_App, p_My_Container, NULL);[/code]

The ABM_Terminal_App is an “Internal Link” created from within PhAB.

This does indead create a “Terminal_App” window but the window is not within the container (My_Container), it is just floating like any other window.

Any ideas?

That’s exactly what windows are meant for.
Have a look at Picture modules instead…

But in all other languages I have used (VB, C++, Delphi) you can have windows inside a “workarea” (PtScrollContainer style widget).

Anyway, I have found out from QNX that this is not possible, although I feel it should be, so I have had to create my own window (using PtContainer) and setting its parent to the PtScrollContainer widget “workarea”. I have now got to add the code to make it resizeable/ draggable etc. I just seem to be re-inventing the wheel!

OK, now I’ve got a better idea of what you want to achieve.

Perhaps this can be achieved with some sort of clipping function (search help for clip if you haven’t done yet)

Perhaps you could also use the standard window and create a raw callback restricting the dragging area (sort of return Pt_END; in case the window would be dragged out of the container). But I am not sure if this works out.