What window to show on start

I have three windows named KAT, main, OSC.

In “App >> Default Window” is “main” selected.

This has been working as expected since… a long time ago.
But just now, when dealing with the dates (parseDate) inside the User Interface, something changed the order of the windows!

Now main “open” with “KAT” on top!

It’s wrong!! I didn’t fiddle with the windows or show/hide windows or any code related to this…
I must have marked something somewhere!?
Where do I look?
There is only one line of code, “KAT.show” inside the project.
An “main” is selected in the “App >> Default Window”, as described above…!
Where is the mistake!?

Same error now occur with the complied version. So… “it’s there”, so to speak!

I answer myself:

App >> Event Handlers >> Open

' ## TURN (ON)/OFF BUTTONS / TEXT KAT.btnShowURL.Enabled = FALSE

Where do I fiddle with show/hide stuff!?


What about backdrop?
When working in IDE no problem, but no Backdrop when compiling? Why is that?
I use .bmp, as described.
I’ve tried gif, jpg, bmp as well as bnp.
Buttons as images work inside the project.

[quote=146871:@Jakob Krabbe]I answer myself:

App >> Event Handlers >> Open

' ## TURN (ON)/OFF BUTTONS / TEXT KAT.btnShowURL.Enabled = FALSE
[/quote]
IF KAT is set to have implicit instance enabled in the IDE this will show it immediately

You can turn those enabled settings off in the IDE

Yes, thank you!
But then loads of other errors show…

I put the code inside the button opening the window:

' ## TURN (ON)/OFF BUTTONS / TEXT KAT.btnShowURL.Enabled = FALSE KAT.show

Nothing fancy. It works.

Do you happen to have any inside-info about the backdrop that might be useful for a novice coder…?

If your just turning them off why not set them disabled at design time ?
Or do you sometime show this window then hide it then show it again & need to toggle the enabled disabled state on / off then ?

The background image I’m not sure
Usually, the few times I use them, I just drag an image to the project & set the Window.Backdrop to that image
But I don’t do this very often

For me, it’s easier to show buttons inside the project, in the IDE, so I know where they are. There will be more buttons and more Windows later on. At the moment, there is only one, KAT.

In the property of the Window you can select “Background >> Backdrop >> Browse…” and it’s loaded into the project.
It show in the IDE but not in the complied version of the same…


If you drag it into the project, it will occur as a Canvas, then it works to select as a Backdrop.

Enabled / disabled has nothing to do with being able to see them in the IDE window layout designer

[quote=146882:@Jakob Krabbe]In the property of the Window you can select “Background >> Backdrop >> Browse…” and it’s loaded into the project.
It show in the IDE but not in the complied version of the same…
[/quote]
That would be a bug then
You should end up with a project item (in the left hand pane) that is the picture & your window set to have that item as its background
I just did there here as a quick test on OS X

Don’t drop it ON the window itself.
Doing that is a short cut to adding an image then a canvas and then setting the canvas backdrop to the image you just added.
Drag it to the left hand area where you see the list of project items (the very far left panel)
Drop it there then select the window & set the background popup to that image

If you haven’t already I’d definitely suggest you read the users guides from http://documentation.xojo.com.
There’s a LOT of things that are not in the Language Reference as they are related to how to use the IDE which is not the language itself.

Leave implicit instance on for KAT and set visible to false. That will prevent it from showing, even though your code forces it to be created.

True! Silly me! :slight_smile:
Excuse me!

Bug or not, Backdrop work at random… My computer is a five years old Asus laptop, Windows 7 Home, 4 GB RAM (that’s off for vacation…)
I have a newer laptop, however, the Backdrop is not important enough to fiddle with for more time than I’ve already done.

That worked in the IDE and in the developers debug version but now I tried in the compiled version and this time, it was not working… Well. Just for information!

That’s an aful lot of text!
However, I will take the time to read it all.
I use the dosc frequently. I think it works better and faster than the local Help system… that need an awful lot of thinking before acting.


Thank you all for great advice!!