TDialogService for numbers only, FMX Delphi - delphi

Is it possible to use TDialogService as input dialog with only one OK button? And only showing the numeric keypad (to choose from)?

Related

Issue with Delphi Menu

I am Using RAD Studio 2010 and I have problem in Menu text
There are Z and Y texts in my menu and I want to remove it
This will happen when I use Non English text
This is because of TMainMenu.AutoHotkeys. By default, the value of this property is maAutomatic, which means that the menu will automatically choose accelerator keys for your menu items.
For instance, in a typical English application, you might get a menu like this:
Notice the underlined characters. These are used to access the menu using the keyboard. For instance, to open the File menu, I can press Alt+F. And once the File menu is open, I can press the key corresponding to the underlined character in the caption of the menu item I wish to invoke.
For keyboard users like myself, such accelerators are extremely important. I use them all the time. I could use the mouse instead, but that would slow me down tremendously. (For instance, in the application in the screenshot, I am very used to press Alt+E, O to open the Sort Lines dialog box. That takes about 0.2 seconds. If I had to use the mouse, it would take much longer!)
Now, in your case, there aren't any Latin letters to underline, so instead the RTL adds these parentheses (with the Latin letter being the accelerator), so you still can access the menus using the keyboard.
I have very little experience with non-Latin-based versions of Windows, but I do believe menus like these are standard. If I were a Chinese or Arabic user (for instance), I think I would refuse to use an application without these. If I cannot access GUI menus and controls with the keyboard, I get really annoyed.
Still, if you insist, you can set AutoHotkeys to maManual.

Allow user to enter Alt code into a TMemo?

TMemo in FMX supports the display of Alt codes, but the only way I can add them is by copying them from elsewhere and pasting them into the TMemo. I'd like to allow users to enter Alt codes using the Alt key and number pad in the same way that most text editors allow. Currently when I try this it does nothing. The number pad works but not when Shift, Ctrl or Alt are pressed.
Alt codes can be entered in VCL applications. I'd just like to be able to do the same in FMX.
I'm using Delphi 10.4

Allow user to select text in ShowMessage dialog

I am writing a program in Delphi XE2. At one point in my program the user will be presented with output text, which I display through a simple "showmessage('The text of interest')" dialog.
I would like for the user to be able to copy and paste this text if they like to. It's not a key part of the program at all but I know that it might be nice for them to be able to do so.
At the moment, as far as I can see, it is not possible to select all or parts of the text from this type of message box, which brings me to my question: is there some way to make the message box text selectable for the user, or will I have to move on to other ways of displaying the text if I want this functionality? Any help would be greatly appreciated.
When you call ShowMessage a system message dialog is shown. This dialog does not support highlighting of individual portions of text. However, the dialog does respond to CTRL + C by placing the entire content of the dialog on the clipboard.
If you absolutely must have selection of individual portions of text then you will need to create the dialog yourself using Delphi controls.

Using Unicode characters with Delphi XE2

I'm looking at converting one of our applications to Delphi XE2 and generally take the opportunity to bring it up to date.
One of the features of the application is a StringGrid that displays a number of check marks in a couple of columns. To achieve this the grid is actually 2 aligned grids - the second of which is setup with the font as Wingdings in order to display the check marks.
Am I wrong in thinking that I should be able to use something like a TListView and use the checkmark char (U+2713) alongside the rest of the text... If so how the heck do I do this?
Do I need to set the font to Wingdings for that column? Does this need to be in OnDraw?
Am I barking up the wrong tree...
File->New->VCL Forms application
In the Component Palette, expand the Win32 tab and choose TListView, and drop it on the form.
Right-click the newly added TreeView1, and choose Items Editor... from the context menu.
Click New Item. Type in any text (for instance x Testing, using the 'x' as a placeholder for now).
Start the Windows Character Map application (Start button, type Chara in the search box, or Start->Programs->Accessories->Character Map). Change the font to Arial Unicode MS, and navigate to the character you want (it's in there).
Click the character, and then the Copy button. Switch back to the IDE, select the x placeholder you put in the edit, and hit Ctrl+V to paste the character you just chose from Character Map. You should now see your check mark (or whatever character you chose), followed by Testing.
(The steps above are the two-minute process I followed to find out how to do this, and that quick experiment showed that you could.)

How can I show the numeric virtual keyboard on the Blackberry Storm?

I'm having some difficulty showing the virtual keyboard I want for the Blackberry Storm. I have an option to toggle the keyboard's visibility on a certain screen. Whenever the user types a number, it's handled by the screen, rather than any particular field (there are no textfields on this screen). This much works fine. I can show and hide the keyboard when the user chooses to.
My question is this: How do I make the keyboard that shows up the same as what would appear had the focus been on a BasicEditField with a numeric filter applied, without using a BasicEditField for the input?
I don't think BlackBerry has exposed any APIs to allow for programmatic control over the type of virtual keyboard that is shown. I seem to remember reading about it in the BB forums (although unfortunately I can't find it now).
One thing you could try doing is using a BasicEditField with a numeric field, but place it offscreen so that it isn't visible. When you want to capture numeric input from the user, put focus on that element. I haven't tried this, it's just a thought.

Resources