I am upgrading an old app written in 2019r1.1 to 2023r1.1 using Windows 11. After I dragged a listbox from the library to a container, I expected to find the Opening event, but all that comes up is Open which makes me think it is API 1. That is further born out by the GridLinesHorizontal property instead of GridLineStyles. I was expecting that any new controls I add to a window or container would be API 2. How do I fix this?
Another interesting thing is that if I right click on any control (before duplicating or deleting it), the entire window is selected instead of just the control. Thank God for Ctrl-Z to get the window back. Fortunately, the options in the Edit menu work.
From what I understand if you open a non-DesktopX project into Xojo 2023r1.1 it will add by default non-DesktopX controls
If you add a Window that is DesktopWindow, then the controls should be DesktopControls, but to add a DesktopWindow you need to change the App super from Application to DesktopApplication
Tim had the answer. I was expecting the Library to contain API 2 controls instead of API 1. Adding Desktop to the super fixes it. Is that a bug I should report or is it the way it is supposed to work?
I think is designed this way.
Mixing controls is not a good idea. For example, on you non-DesktopWindow Window add 5 non-Desktop controls and run this code:
Dim test As Integer = Self.ControlCount
now change 1 control to Desktop control and run the code again. You will get 5 on first run and 4 on second run as a non-Desktop window can’t count Desktop controls in it.