PopOver

I want to add PopOver into a window and I want my popuver, once populated have this look:

I removed these white parts (left and bottom).

I want my window have the top and bottom left as round, just like the example (taken from today’s ■■■■ Tracy). Text and Images are OK, only the Left RoundRect poses problem.

Is it Possible ?

PS; in HyperCard it was possible to pass an image and the window took its boundaries; but this is Xojo.

Something like that:

I initially set the two booleans to False, write this Post, then continue, setting the Booleans to True and I discovered the close button that was not there initially / a click in the calling window closed the PopOver.

Still: is it possible to change the window from Rect to RoundRect ON THE LEFT ONLY ?

I find the ShowPopUp option to be quite limited. I would think the best approach is to make your own window using transparency to make those cut-outs.

I used the following (old code now but still working) from someone else on the forum (sorry, forgot who) to make the window transparent.

//Declare to make window transparent.
const Cocoa = "Cocoa"
declare sub setOpaque lib Cocoa selector "setOpaque:" (id As integer, b As boolean)
declare function NSClassFromString lib Cocoa (aClassName as CFStringRef) as Ptr
declare function clearColor lib Cocoa selector "clearColor" (NSColorClass As Ptr) As Ptr
declare sub setBackgroundColor lib Cocoa selector "setBackgroundColor:" (w As integer, c As Ptr)

//allow for transparency by setting opaqueness false
setOpaque(self.Handle, false)

//set the background completely transparent
setBackgroundColor(self.Handle, clearColor(NSClassFromString("NSColor")))
1 Like