Windows show/hide toggle control - c

I'm trying to create a window control where you can toggle the state from hidden to shown, that hides/shows some stuff when not hidden.
Something like this:
Is there any built in control to handle this? Or do I have to implement it myself?
And what would be the best method to implement something like this?
Thanks in advance..
(Also is there a name for this? I have no idea what to call it)

You'll have to implement it yourself, but it's just a button with an icon on it that changes when you click it! Should be a breeze :-) Another way to do it is have 2 buttons in the same position and they hide one another when clicked - can be simpler to do.

Related

Is it possible to show SimpleDialog internally?

I didn't really find any way to show SimpleDialog internally in MetroWindow. Is it possible?
Note: SimpleDialog has been renamed with CustomDialog.
Have you seen the documentation for dialogs? I also recommend to have a look at the sample application.
I was just looking at this myself. To show the dialog internally you use the ShowMetroDialogAsync Method on the MetroWindow:
From a user control:
((MetroWindow)Window.GetWindow(this)).ShowMetroDialogAsync(myMetroDialog);
And you can close it from inside the dialog using the MetroWindow.HideMetroDialogAsync:
parentWindow.HideMetroDialogAsync(this);

how to change the position of textfield in adf forms?

Hi friends i am using jdev 11g release2 (11.1.2.4.0).I want to create a registration form from dragging datas from data control and my question was how to change or move the position of textfield in that form into different areas?
You should be using various layout components to achieve the layout you want, and remember that layout components can be nested to create more complex layouts.
See some examples here:
http://jdevadf.oracle.com/adf-richclient-demo/faces/feature/layoutForm.jspx
You can use the view source menu to see how they achieved that.
http://jdevadf.oracle.com/adf-richclient-demo/faces/feature/layoutBasics.jspx
Please be a bit more clear in your query. From what I was able to make out:
You can either use the "code view" of the JDev to move the code which represents the component to a different location or use the "Design view" to drag and move the component.
I would recommend the first approach as it makes it easier to manage the code/layout
You can change the position of the fields within the form or you can drag them out. However for this you should try out some tests and see which suits you best. I think if you surround each attribute with "Panel label and message" you will have a better view of your page.

How would you dim a container/panel like a modal Msg?

I'm trying to implement a view that requires a response from the server to update itself, so I'd like to 'dim' the container and show a spinner while it's asynchronously loading information from the server and then 'undim' when it's finished.
I've seen the same effect from the background of a Msg/Panel and would like to implement exactly the same thing with a spinner in the middle.
I think you want to use the regular extjs loadMask, let us know if you need help using it.
If you are looking for how to create a modal window in Sencha touch, then this is the best example.
http://www.sencha.com/forum/showthread.php?122382-Can-I-have-a-quot-popup-quot-panel-opened-on-clicking-a-button
You can mask the panel using loadmask configuration

Google like SearchBox in Silverlight

I've created a Google like SearchBox control in Silverlight. That means, as I type in the box, a DropDownListBox appears just below the SearchBox, showing all the items that match with the text I've typed in searchbox so far (i.e AutoComplete feature), exactly like this:
Now, I want to add a functionality to it : I want to make the DropDownListBox to disappear, as soon as user clicks outside it, or anywhere on the screen. I cannot handle MouseLeftButtonDown (or any such event) in other controls, to accomplish this, because users can click anywhere, including non-silverlight region. Can anybody suggest me what should I do to achieve this?
So my question basically is:
How to know if user has just clicked and the click event occurred outside a particular control?
Please note that AutoCompleteBox doesn't serve my purpose. So I cannot use it.
I have a feeling that working with LostFocus event can solve your problem.
I guess this question is a bit old, but i just stumble upon trying to do the same and finding a solution. This is what i did
Created a Border with All Margins -500, this will cover the full screen essentially.
On Click Behaviour of this Border, the dropdown section of SearchBox
is collapsed.
Adjust z-Index of Border just below the SearchBox and DropDown
section, so clicking on SearchBox or DropDown wouldn't close it.
Set Border Visibility Collapsed, and make it visible when DropDown is Visible.
I hope it helps someone who is looking for the similar problem.

How to catch/handle the window form's hidden/showed events?

In my application I call App.Current.MainWindow.Show()/App.Current.MainWindow.Hide() to show/hide my application but I don't know how to catch the event when the form is hidden/showed. Please help if you know how to!
One of your tags is WPF and the other is WinForms... I'm better with WinForms, so I'll answer for that tag.
The Form.Shown event documentation is here with sample code...
There is no corresponding Form.Hidden event. The best you can do is choose from Form.Closing or Form.Closed or one of the other events.
Added from my comment above
Question - if you're CALLING the Hide and Show in your code, why do you need to capture the events? You already KNOW when it's happening. If you want to run some code inside the form after hiding and closing it, expose the code as a public function, and call the function after showing and hiding the form...

Resources