ComboBox

I’m trying to figure out what type of Window the ComboBox is using (or popup). I’m trying to have a similar window that won’t disappear when it loses focus and will stay in front of the window with the focus. The textbox doesn’t float, the floating window has a titlebar and a popupmenu goes away when it doesn’t have focus.

TIA

A listbox set to display on top should do the trick. Unless of course you want it to display outside of the window, but the is an entirely different story.

Unfortunately the other controls will bleed through a listbox it’s got to be a window :frowning: Same with a Container Control

It most certainly would help if you posted in Windows or Mac, instead of General. Bleeding occurs mainly under Windows, so I will suppose that is what you do.

Look at feedback://showreport?report_id=40171 where I posted a decalre you can put in the Open event of a floating window to obtain a floating plain box window.

Thanks for the link, It’s for both Mac and Windows that’s why I’m using Xojo and not VS.

Specifying the platform greatly helps. If both, then you just mention it.

On Mac, I don’t think you need a window. There is not the same kind of bleed through.

However, you could use the same technique employed in MacOSLib to show a round window to remove the window bar or a floating window. I vaguely remember seeing a declare to specifically remove it, but it evades me.

have you tried a plain box window ?
has no frame headers title bar etc

[quote=330295:@Norman Palardy]have you tried a plain box window ?
has no frame headers title bar etc[/quote]

This isnt the case for Windows 10, it has a white bar at the top, there is still an outstanding feedback://showreport?report_id=40171 on this from July 2015 =\

Do you see one on the autocomplete list on Windows ?

Never mind
that one is a floating window with a couple declares to remove the title bar etc
At one time it was a plain box

Nope, I realise that you dont need a resizable window for this after I read the bug a bit more :slight_smile:

Thats not a “real” popup window though, its taking focus from the main window, which shouldn’t happen on a popup.

I use a global floating window and then add this declare to remove the title and keep it from ‘steeling’ the focus from the main window. The problem is that now you won’t be able to use the lost focus event to hide the window. You need to detect a mouse click outside of the ‘popup’ by using a timer.

#If TargetWin32 Then Const GWL_STYLE = -16 Const WS_Custom = &H40800000 Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (hwnd As Integer, nIndex As Integer, dwNewLong As Integer) As Integer dim i as Integer i = SetWindowLong( DList.Handle, GWL_STYLE, WS_Custom ) #EndIf

I was trying (not very hard) to figure out how to do this on Mac. https://forum.xojo.com/40342-window-styles-and-declares

I had this problem when I wanted to create a popup date picker control. The controls would bleed through the canvas I used to create the popup. I got around controls bleeding though by disabling any controls underneath the canvas when it was visible, and the reactivating the controls underneath after a date was picked.

I guess noone read my post ages ago about fixing control ordering and stopping controls coming to the front out of order then? :frowning:
I don’t know why I bother!!! Think of the children!!! The chiillldreeenn! :wink:

As long as it doesnt go outside the bounds of the window that should be simple to do with a control that is on top of the stack that is shown/hidden when needed.

Control order fighting is due to Xojo not having a standard (correct) zorder.

Read more about it here https://forum.xojo.com/38658-xojo-framework-z-order-backwards

feedback://showreport?report_id=47001 has some code attached that can get around and fix all zorder issues Xojo has in windows.

When I’ve finished what I’m doing at the moment (drawinto), I’ll be spending some time create popup windows/menus with drop shadows (or not) similar to combo boxes.

[quote=330295:@Norman Palardy]have you tried a plain box window ?
has no frame headers title bar etc[/quote]
Yes, it doesn’t stay on top. I got the Floating window to work.
@JulianS I found the window pretty easy to use and position where I needed it. i.e. above the control if it’s low on the screen or below if it’s not.