How do add a new symbol to a keyboard layout? - layout

I like to assign Alt+174 and Alt+175 to AltGr+5 and 6.
It's hard to pass formatting standard on this site.

Related

Android studio just downloaded and gives an error

I have a problem with android studio. I just downloaded and when I try to add something the app for example a button or text I get the following error:
This view is not constrained. It only has designtime positions, so it will jump to (0,0) at runtime unless you add the constraints The layout editor allows you to place widgets anywhere on the canvas, and it records the current position with designtime attributes (such as layout_editor_absoluteX). These attributes are not applied at runtime, so if you push your layout on a device, the widgets may appear in a different location than shown in the editor. To fix this, make sure a widget has both horizontal and vertical constraints by dragging from the edge connections.
Well I haven't actually done anything... Download it and instantly error...
After research I found that in the Layouts tab there is an option called ConstraintLayout. I double clicked on it and then I added the button and a warning appeared named hardcoded text and it says:
Hardcoded string "TextView", should use #string resource Hardcoding text attributes directly in layout files is bad for several reasons: * When creating configuration variations (for example for landscape or portrait)you have to repeat the actual text (and keep it up to date when making changes) * The application cannot be translated to other languages by just adding new translations for existing string resources. There are quickfixes to automatically extract this hardcoded string into a resource lookup.
There is a suggested fix but it wont change anything...
Anyone know what to do or it is just my luck...…………...
Just go to Design Tab and on Layout right-click on the layout you've and select Constraint layout --> Infer Constraints.
If you don't find this tab Infer Constraints then you've another android version so just go to Design Tab and click on the button you added you'll find a toolbar appeared you'll find in it an icon for a Magic Stick just hover on it you will find it's Infer Constraints click on it.

How to change color of TEdit when focused

It's probably easy question, bu I can't find an answer.
I want to change background color of TEdit component when I click on it (on Focus), and the background should back to previous color when I click somewhere else.
P.S. I use a Firemonkey and it's multiplatform app, so I need to use a style.
The easiest way (and best) - place TRectangle without Stroke into Tedit, set its Align to Client and change its Fill color in Object Inspector.
Hard way:
Tedit is using bitmap from styles. You can see your current style for Tedit - place StyleBook, Load your style from file, find 'editstyle' object.
You can create a new style for Tedit (copy 'editstyle' in your current style, and name it like editstyle1, select background > Source Link in Object Inspector - select part on global style bitmap with your color, then you can change to new style like Edit1.StyleLookup := 'editstyle1';
Also use a useful forum: http://fire-monkey.ru with Google Translate.

How to align label and textbox on sameline in angular formly?

How to align Label and Textbox on same line in Angular Formly? By default the Label is placed above an Input. How to align it in-line with the input?
Are you using bootstrap templates ? If yes is this what you are looking for?
If you are not using bootstrap templates then you can find the example there on how its done and make your own.
REMEMBER: Even though sometimes there is space to put the label on the left of the input (so it's on the same line) there are cases where it HAS to be above the input so that it will fit on screen (be responsive) and give a good user experience.
In know that it is late. But i can add something that works for me
Your type must be inline not just input or stacked-input:
type: 'inline-input'

How to add color picker in mfc?

i want be able to select any color i want, just like the attached pic.
yes i want to learn this c++ or mfc . I find it more powerfull . Could u explain to me exactly how to add it to my project. I also want the color iteslf and it code appers in picture box and textbox.
Thanks
Use CColorDialog class in mfc is used to pick the color from mfc
// Get the selected color from the CColorDialog.
CColorDialog dlg;
if (dlg.DoModal() == IDOK)
{
COLORREF color = dlg.GetColor();
}
This sample will popup dialog to select the color and after selecting the color and click ok button then color variable will contain the selected color.
Use this color in your application.
EDIT
You can customize your combo box or list box to add the color pick tool.
Refer this link : CodeProjectSample
CMFCColorDialog is what you seem to be looking for. To make it act like a drop-down, you'll need to position it below the down-arrow button (e.g., using MoveWindow).
Since you don't seem to have the MFC Feature Pack, check the Ultimate Toolbox at http://www.codeproject.com/KB/MFC/UltimateToolbox.aspx. Its Graphical User Interface classes have a Color Picker.
For Visual Studio versions prior 2008, you can use BCGSoft's color pikcer (http://www.bcgsoft.com). MFC color dialog is based on this one.
I had a similar problem with CMFCColorButton. I added the graphic resource with the ToolBox on my dialog design, but I could't assign a control variable because it did not recognize CMFCColorButton.
The answer was to include afxcolorbutton.h in the header of stdafx.h. Maybe you can fix it in the same way.
I hope this helps

Problems with MFC link control wrapping

I'm using a CMFCLinkCtrl in my custom dialog that inherits from CDialog. The CMFCLinkCtrl is set dynamically using data that is set by the user in another part of the application, so I have to handle long urls.
Is there a way to have the link control truncate what is displayed in the dialog and add an ellipse to the end? Currently the control is wrapping to the next line when it is too long to fit in the dialog or sees the "//" in the http://.
Static controls have an SS_ENDELLIPSIS style that does exactly what you want, but unfortunately this won't work with CMFCLinkCtrl which is derived from CButton. So you have two choices:
Use a static control with the SS_ENDELLIPSIS style, but you'll have to set the text colour and font yourself, and handle click events and open the URL manually.
Subclass CMFCLinkCtrl and add custom drawing code to add the ellipsis.
I think you're out of luck. You'll have to do what casablanca said or without subclassing truncate the text yourself (calculate the font size and link control size) and set it using SetWindowText.
You can easily resize the control to contain the entire text using SizeToContent, but I don't think this works for you.

Resources