Main XUL window that will have blocked resize - resize

I'm looking for a way to block user from resizing main window in XUL app with no luck.
I want to have window that won't be resizable. Can anyone help ?

If someone will look for it.
in prefs.js in preferences
paste this: pref("toolkit.defaultChromeFeatures", "chrome,resizable=no,dialog=no");

Related

XCode - Create an application without a window and paint directly on screen

I'm searching now for a while but can't find an entrance…
The application should behave like a ruler app which is always in front of all apps and does not have a window. I want to draw things directly on the screen.
Would be great if someone could help me out with some keywords to search for or a concrete step into.
Thanks in advance.
Create a borderless transparent NSWindow and draw your content inside it. There are many examples for creating those around.
Use setLevel: to control how the window floats over other windows.

How to make an app without titlebar?

I'm quite new to developing on the Mac, I've only done iPhone programming until now. I'm trying to make an app that doesn't have a titlebar. I'd still like to allow the user to move the window around by clicking anywhere within the window and dragging. Is this possible, and if so, how can I get started on something like this? Thanks!
You could make it a borderless window.
[myWindow setStyleMask:NSBorderlessWindowMask];

how to make an NSWindow blocking other Windows?

i'm looking for a way to have a NSWindow, which is able to block other NSWindows, like the menubar does. I mean: It is not possible to drag a Window over the menubar.
Is that kind of behavior realizable for my own NSWindow?
Thanks in advance
Bijan
NSWindow's dragging behavior automatically keeps windows from going under the menu bar — because they aren't supposed to. If you have some special case, you can override the standard dragging behavior. But think carefully before throwing away standard functionality prescribed by the HIG.
Also, it isn't possible to drag a window over the menu bar (rather than under) unless it's also over everything else, because the menu bar is normally above every other window.
I just stumbled on this question. There they say it is possible to move other windows using the Accessibility API or the Quartz Window Services.
Can't I just read out the other window's positions and move them, so that they do not collide with my window? Maybe triggered by a 0.1 sec. timer?

NSBorderlessWindowMask Window wont show NSPanels if not front most window

I have a window that is set with NSBorderlessWindowMask, and also kCGDesktopWindowLevel. When a NSPanel is supposed to appear from say the selection of a Dock Icon menu or a Status Bar Item menu, the NSPanel will not display if the application is not the front most window.
So this program at this time only has a Status Menu Item (think how QuickSilver is implemented) and when I choose Preferences from my menu it is set to show the Preferences Panel by using Makekeyandorderfront, however unless you have just launched the application and done nothing else, when you select Preferences nothing happens.
I have found that when I choose my menu item for Sparkle's Check for Updates, that the check for update panel will appear and then my preference panel which I told to open will appear.
So it seems like makekeyandorderfront is not really bringing it to the front, perhaps.
Does anyone know how to fix this?
Should I call something besides makekeyandorderfront, or maybe something in conjunction with it?
Thanks in advance
Panels are designed by default to work this way. They're designed as auxiliary windows for your application and always disappear when the application deactivates. You will probably also run into issues with the panel becoming key... but to cure your disappearing panel issue, send this message to your panel:
[panelObject setHidesOnDeactivate:NO];
You should probably be using actual NSWindow objects here instead of NSPanel objects, but since I don't know much about how your application works, you'll have to look into that yourself. For more information on the difference between panels and windows, please review the documentation here: Window Programming Guide

Is it possible to display a modal window in SCSF application at the center of the screen

In SCSF application I would like to display a view as a modal window at the center of the screen. Is it possible to do that?
WindowSmartPartInfo doesn't have any option for setting screen postion.
Thanks.
Assuming you're talking about Winforms, not WPF since the WPF layer for CAB does expose this option. In winforms there is no option in the WindowSmartPartInfo to do this. However, you could extend it and extend WindowWorkspace to use your new SmartPartInfo (override the OnApplySmartPartInfo method).
Before you do this, you might want to check the contrib and community sites to see if anyone has already done it. I think I've seen one somewhere.