Remove minimize/maximize buttons from window, OpenTK - forms

I need to disable/remove the minimize and maximize buttons in window form.
I don't know how to access the form from my OpenTK.GameWindow, any help is appreciated.

This is deceptively easy:
WindowBorder = WindowBorder.Hidden;
GameWindow does not use WinForms, it p/invokes the underlying platform directly (performance!)
Edit: or do you mean keep the close button but remove minimize/maximize? The closest to this is:
WindowBorder = WindowBorder.Fixed;

Related

VB Hiding Child Forms

I'm making a program that involves children, kind of. I'm using form2.Owner = me instead of parenting Mdi.
I have a button on Form1 that needs to hide the child forms, or even move them to back so I can only see Form1. Is there anyway to do this? If so, I hope there's also a way to undo as well?
If you only know of a way for parenting Mdi, I'll be willing to change, as long as it can get finished.
Thanks,
Zach
"Is there anyway to do this?"
FormName.Hide()
"I hope there's also a way to undo as well?"
FormName.Show()
If you simply want to hide it momentarily from prying eyes, I suggest minimising the form.
Me.WindowState = FormWindowState.Minimized

SC.say location issue

I am currently facing an issue with fixing the location of SC.say pop up on the screen. The default behaviour of this pop up is okay, as in , it comes at the center of the screen. But then, once you drag this pop up to a corner of the screen, then , the next time when this pop up comes , it comes at that same corner where you had dragged it to. The default behaviour of this pop up (as far as the location is concerned) changes when the user starts dragging it. Is there a way to switch back to the default behaviour irrespective of where the user drags this pop up to?? I checked the javadoc of this SC class, but couldn't get any function that would let us specify the location where this pop up should come.
SmartGWT version : 3.0
GWT version : 2.4
Browser : Firefox,IE,Chrome,Safari
If you didn't find an easy solution to this, I think the easiest way is doing a "SC.say" by yourself.
it's very easy to replicate the built-in dialogs and then add your own functionality.
Something could help you
Canvas popUp = Canvas.getById("isc_globalWarn_body");
popUp.setTop(where it was);
popUp.setLeft(.......);
popUp.setWidth(...);
etc.....
I find the id with the console and the Canvas static method on a post somewhere on the net I don't remember where.

avoid chrome popup extension to close

Is there a function that allow me to select text when the extension
stays open. Normally when I Use the extension popup and I Click outside the
extension the extension close. Is there a wat to avoid this.
Thank you so much
Unfortunately there is currently no way to keep the popup open once you focus out of it. This is by design.
If you would like to always show something while interacting with the page, perhaps the experimental Info bars or even Desktop Notifications would work?
Hope that helped!
The only way to keep it open is to right click over the extension icon (button) and select "Inspect popup" the extension popup then show up and remain open but of course the debugger window show and this not a fix obviously still it will maybe inspire a hack... if someone is skilled enough and share the solution with all of us.
I encountered the same problem and I've thought of a possible solution (though not tested it):
Use your background.html to store the content of the popup action and upon loading the popup, you fetch the content via the default messaging for chrome extensions.
When doing all kinds of other stuff, like XHR's or something, I think you should do that in background.html too, so the requests won't abort if you close and you can do something with the result. Then when a user re-opens the popup, he'll see the result of his previous action instead of the default screen.
Anyone tried something like did already?
As far as I know you can't persist a pop up menu but my workaround has been using a content script to append a menu on page load. After the menu is appended you can toggle the menu via messaging between the background script and the content script.
If you want to encapsulate the menu from the page it's deployed on you could wrap your menu in an iframe. This could add complexity to your project since you would have to deal with cross origin issues and permissions.
There is an alternative hack for this. You can make use of chrome local storage to store the metadata as needed. Upon restart you can read that metadata and render the desired content. You will also probably clear that metadata after you have completed performing the operations based on that.

Submit form from greybox window to main window

I'm using greybox and trying the following thing: I want to make a form inside the pop-up so when the users submit's it, the request goes to the main window and the pop-up closes.
I know the way to close the window is by using onclick="parent.parent.GB_hide()", but I really haven't been able to find a way to make the pop-up close and the data sent to the corresponding controller when the form is submitted.
I'm using Zend FW.
Thanks in advance,
I really appreciate what this community does.
Just use this code given below at the end of the loop
parent.parent.GB_hide();

How to Create the Highlight/Note Popup Buttons from the iPhone Kindle

I am wondering how Amazon did the highlight/note popup buttons in the Kindle app. After reading about UIPasteboard, UIMenuController, UIResponder, and UIResponderStandardEditActions, I am able to turn on or off standard edit actions (i.e. copy, cut, paste, select, and selectAll). However I haven't found a way to add a custom action yet. I would really appreciate it if I could get a pointer.
Thanks in advance!
Chris
(source: sampletheweb.com)
Edited by balexandre (added image instead link)
It looks like Amazon implemented their own custom view that mimicked the appearance of UIMenuController. I believe they did this rather than use SPI because if you click and hold on the Highlight cell, the arrow does not highlight, when it does in the real UIMenuController.
I don’t think there is a public interface to these controls, you’d probably have to code them yourself. (Or maybe figure out the private API, but that’s a slippery slope.) I am not sure about that, though, maybe somebody will prove me wrong.
That's a good point about the arrow part of the Notes/Highlight popup menu not highlighting, so they must be implementing their own.
However they are also obviously using a UIWebView, because it's recognizing tap and hold and they can highlight the text, and you can't get touch events from a UIWebView, much less get the information about what's selected. So how are they doing that?
This would be very useful for us to be able to do as well.
Use DTMenuController http://www.drobnik.com/touch/2010/01/dr-touchs-parts-store/
Costs 100 EUR ^_^
Custom menu items can be added via the UIMenuController's menuItems property. See Apple's UIMenuController docs.
the javascript part can be managed with jQuery, that's a fair simple and powerful library. i'm using it for resizing and rearranging things in a webview and it works great :)