My text in FireMonkey isn't as sharp as the rest of windows text.
I read this website: http://i-logic.com/firemonkey/fuzzy.htm
Now i am wondering how to change the text rendering to TextRenderingHintClearTypeGridFit or TextRenderingHintSystemDefault. This is recommended by the author at the end of the page.
Thanks in advance.
Related
With Vaadin 8 you could set a tooltip for a Grid cell. This feature is not available in Vaadin Flow (currently using v 11.0.0). Is there an alternative?
There is no built-in feature yet. The easiest way is probably to set "title" attribute of the element. One example is to use TemplateRenderer, and there is example of that here
https://vaadin.com/components/vaadin-grid/java-examples/using-templates
Copying the relevant part of the code from the example above
grid.addColumn(TemplateRenderer.<Person> of(
"<div title='[[item.name]]'>[[item.name]]<br><small>[[item.yearsOld]]</small></div>")
.withProperty("name", Person::getName).withProperty("yearsOld",
person -> person.getAge() > 1
? person.getAge() + " years old"
: person.getAge() + " year old"))
.setHeader("Person");
Thanks to #Tatu-Lund's answer I got the idea, but since the link is not referring to a valid location anymore, and also the example code with div can bring other complexities into the game I decided to post another answer.
Using div as the wrapper element to have the title attribute would work, but it will prevent the columns to be resized. So using span would be a good replacement.
Also, setting the title would help with a normal tooltip to show up, but it is not enough for accessibility support. Setting the aria-label in addition to the title would make it smoother:
grid.addColumn(TemplateRenderer.<Person> of(
"<span title='[[item.name]]' aria-label='[[item.name]]'>[[item.name]]</span>")
.withProperty("name", Person::getName)
.setHeader("Person");
However, this is not a complete workaround as this would not help to browse the web app on touch devices. Please refer to the following issue for more information: https://github.com/vaadin/flow/issues/4169
I spent a few hours searching Google to see if anyone had shared their articles, but came up empty-handed.
If it's possible, I want to know how to enable/disable the PasswordChar in Delphi XE8's TMemo to hide user input like in TEdit. ? Maybe via a checkbox!
So when the checkbox is checked then all text turned to asterisks, and if the checkbox is unchecked, all text back to normal..
The VCL memo control is a loose wrapper around the Win32 multiline edit. The password character functionality of the edit control is only available for single line edits.
The behaviour is controlled by the ES_PASSWORD style for which the documentation says:
Displays an asterisk (*) for each character typed into the edit control. This style is valid only for single-line edit controls.
The FMX memo control offers no password character functionality for the multiline memo control.
Presumably these frameworks don't offer what you want because passwords are entered in single line edit controls. Developers tend not to provide functionality that has no clear case for being used.
Your options:
Use a single line TEdit.
Write your own multiline memo that supports your desired functionality.
Find a third party multiline memo that supports your desired functionality.
Now, since your question is so general I have assumed that you want full support for single line password character. That is, the user enters text and it appears masked.
But maybe you actually don't need editability. In that case it is simple enough. Do the following:
Load or add the true text into a separate TStringList.
When you want to display the true text assign the string list to the memo.
When you want to hide the content, process the true text into whatever you want to display, and display that.
Make the memo control read only.
if cBoxPassword.checked=false then
edtpassword.PasswordChar:='*';
if cBoxPassword.checked=true then
edtPassword.PasswordChar:=#0;
I'am using DevExpress ASPxScheduler and I want to change the text I've pointed out to something like: [some_localized_text][1-4]
Is it possible, and how can I make it work?
We use ABCpdf software, and recently added a Russian translation option for some of our documents. Most of the contents of the PDF come from a web page using the AddImageURL method. This all works fine, meaning that the Russian text is readable.
However, we have a few text sections that need to be placed exactly at the bottom of the page, so we do this with ABCpdf's AddText method. These strings show up as ???????? in the generated PDF.
Here's a quick code sample:
Doc pdfDoc = new Doc();
//snip snip snip...
//add footer text
pdfDoc.Rect.SetRect(30, 30, 552, 10); //footer section
pdfDoc.HPos = 0; //set horizontal position to left
pdfDoc.AddText(GetRussianString("REFERENCE") + " #" + ReferenceID);
After reading the documentation on Websupergoo's site, I tried using AddFont and EmbedFont (separately and together), but this did not work:
pdfDoc.Font = pdfDoc.EmbedFont("Times-Roman", LanguageType.Unicode);
I also searched for ways to set encoding at the document level, and didn't find any documentation on this, at least not for version 8. We are currently using 8.11.2 of the ABCpdf software.
Has anybody done something like this successfully?
OK, the (totally embarrassing) answer is that I was being far too literal about the example from WebSuperGoo's site. I needed to use the exact font name from my development/production machine.
pdfDoc.Font = pdfDoc.EmbedFont("Times New Roman", LanguageType.Unicode);
Obvious? Yes. But it's one of things that can be overlooked when in a hurry, so I'll post the answer here in case anybody else gets tripped up.
Part of my confusion stemmed from the fact that Russian text added from a URL was just fine in the document, but not the content added as text. I'm guessing that abcPDF sets the font according to the encoding it gets from the web page, but that affects only the content it is pulling in, not the overall PDF.
Anyhow, thanks to gekannt and anybody else who took a look.
I am working on asp.net mvc. I am trying to display the rich text formatted content like,
{\rtf1\ansi\ansicpg1252\uc1\htmautsp\deff2{\fonttbl{\f0\
fcharset0 Times New Roman;}{\f2\fcharset0 Tahoma;}}{\colortbl\red0\green0\blue0;\red255\green255\blue255;}\loch\hi
ch\dbch\pard\plain\ltrpar\itap0{\lang1033\fs24\f2\cf0 \cf
0\ql{\f2 {\ltrch AMANDA WITH RC CALLED AND WANTED TO
VERIFY THAT WE WERE AFFILIATED WITH SHAUN # JAGGYS. LET HER KNOW WE
WERE, SHAUN CALLED RC AS WELL TO VERIFY STATUS OF BD}\li0\ri0\sa0\sb0\fi0\ql\par}
}
}
in the view. Actually this data could come from database table and i need to display it in the editor type control. so is there any open source controls that are able to display rich text format.
Well, I just got done writing a RTF to HTML converter that maintains all embedded media, and creates a MIME multipart message out of it. This is close to what you want to do. Essentially if you aren't interested in writing your own converter, you can look at this CodeProject and use his: http://www.codeproject.com/Articles/27431/Writing-Your-Own-RTF-Converter
There is also descriptions as to how to reach his solution.
On my project we just started ripping apart the RTF document and parsing its contents. Open source and 3rd-Party Libraries weren't an option for me.