How to create appBar like on the picture. It'll be great if the appbar shows only when textbox is focus.appbar below keyboard
You can use the event GotFocus to show your appbar and LostFocus event to hide or collapse your appbar
GotFocus
https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.uielement.gotfocus
LostFocus
https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.uielement.lostfocus
Update : If you want to show your appbar when the textbox is focus you can use IsSticky= True
https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.appbar.issticky.aspx
With this property your appbar will be visible even with the keyboard visible.
I hope this helps!
Related
I'm trying to make a UI that changes to a lighter color when its hovered over (roblox's default is darker)
MouseEnter and MouseLeave have already been tested and don't work the way I want it to. MouseEnter keeps the darkening and makes my target color darker than it should be.
Is this possible, if so, how would it be used?
MouseEnter and MouseLeave will work, you just need to disable your button's AutoButtonColor property.
From the docs :
The AutoButtonColor determines whether the button automatically changes color when the user’s Mouse hovers over or clicks on it.
If true, the button will automatically change color when the mouse hovers over or clicks on it. If false, the button will not change.
When mouse cursor is over some menu item (TMainMenu) then the item is highlighted. I would like to add a text inside my status bar describing the menu item but I have no OnMouseMove or any similiar event for TMenuItem to do this. How to achive this?
I'm using C++ Builder XE6.
Thanks!
The VCL can handle this automatically for you.
Assign your desired text to the TMenuItem.Hint property:
Specifies the text string that can appear when the user moves the mouse pointer over a menu item.
Set Hint to a string that provides more information about the meaning of the menu item than the Caption. The hint text appears in the Status Bar when the user pauses with the mouse over the menu item if Help Hints are enabled (that is, if the Form's and the Application's ShowHint properties are True). It is also available for the code in the application's OnHint event handler.
And then set the TStatusBar.AutoHint property to true.
Specifies whether the status bar's text is set automatically to the current hint.
Use AutoHint to specify whether the status bar's text is set automatically to the current hint. When AutoHint is True, the status bar automatically responds to hint actions by displaying the long version of the hint's text in the first panel.
Any changes to the TApplication.Hint property, such as when the mouse moves over a UI control or menu item, will propagate to the TStatusBar automatically.
I am trying to use the ShowHide effect that comes with Kevin Moore's widget package here:
http://dart-lang.github.io/widget.dart/#showhide
Not sure how to use this. Anyone got an example I can look at ?
Basically all I want is for a dropdown to show with one of those effects if a certain event happens.
Your tips appreciated.
Thanks.
You need to add a listener for an event to an element in the DOM, and then use ShowHide.toggle(element, effect) to trigger an effect. Here is an example which listens for a click on a button, and toggles FadeEffect on an image each time it is pressed:
var button = query("#fadeButton")
..onClick.listen((event) {
ShowHide.toggle(query("#fadeImage"), effect: new FadeEffect());
});
If you wanted to fade in/out a dropdown when you click on a menu bar, then substitute "fadeButton" for the menu which listens for clicks, and "fadeImage" with the dropdown element.
Also, any other effect can be substituted for FadeEffect, such as DoorEffect, ScaleEffect, ShrinkEffect, etc.
I'm using Delphi 2010 and I have a TToolButton contained by a TToolBar. Assigned to the 'DropdownMenu' property of my TToolButton is a standard TPopupMenu.
The only way I can get the menu to appear is to click on the area pointed to by the red arrow in the image. Currently, clicking the area pointed to by the green arrow shows the button as pressed, but the dropdown menu does not appear.
What I want is if the user clicks anywhere (pointed to by green arrow or red arrow) for the menu to appear. Is it possible to enable this functionality?
The idea of the tbsDropDown style is to have a button that triggers some default action when clicked, but provides more variations of that action in the drop down menu.
If you don't care about the down arrow disappearing, you can set the style to tbsButton and no matter where the button is clicked, it will show the popup menu.
If you are like me and you do want to have the arrow there to indicate that there are more options behind this button, you can call CheckMenuDropdown in the button's OnClicked event handler.
Set Style to tbsButton. Then you can click anywhere to show the drop-down menu, but you will lose the arrow.
I have a form in the order;
Textbox
Dropdown
Now when user moves focus from textbox to dropdown, the keyboard still remains and it kind of hides the dropdown options...
How do I make the keyboard hide (onblur of textbox)
I have already tried window.blur and it does not work.
Please help me. thank you.
you can try to focus() on a non-text element.
or
$("#yourTextField").blur(); //jquery