Why does TSynEdit not detect Tab key pressed? - delphi

This is my first question, I hope it will be a well constructed one.
I'm currently using Delphi 10.4 Community Edition and I installed SynEdit through the GetIt Package Manager.
The problem I'm facing is the following: I created a VCL form, dropped a TSynEdit in it and launched the application. The problem is that if I press the TAB or SHIFT+TAB, nothing happens. I tried to put breakpoints in the following methods of TSynEdit:
CommandProcessor
ExecuteCommand
DoTabKey
and the debugger never enters them while pressing those keys.
I then looked at the Keystrokes property of my TSynEdit control and, although the keystroke for TAB is defined, I think that the shortcut is "fake". What I mean is that if I try to modify what is associated to the ecTab command and manually choose the shortcut value, nor Tab or Shift+Tab are present in the listbox.
Did anyone ever experienced a problem like this? If so, how did you manage to solve it?
PS: Indentation works with other shortcuts, such as CTRL+SHIFT+I/U.

As indicated by Keith Miller, it was as simple as setting to True the property WantTabs for the TSynEdit control.
Still, if anyone knows why the TAB and SHIFT+TAB shortucts don't appear in the listbox of selectable shortcuts, please let us know.

Related

How do I stop splitting my editor in Spyder?

I accidentally used 'vertical split' and 'horizontal split' in the Spyder editor (View->Window Layouts->Vertical split DON'T CLICK THIS!), now there is no way for me to go back. Does anyone know how to unsplit windows in Spyder?
Never mind, I found the answer when looking at the keyboard shortcuts (as that's how I accidentally split the screen the first way): alt+shift+W
I was having trouble with an older version of Spyder v4 on Mac, and I got it to work by updating to Spyder v4.2.1, right-clicking on the tabs in the panel I wanted to close, and then clicking "Close this panel" closed the split panel.

Unable to get my Application to detect the Delete button

I apologize in advance for this vague question but can anyone give me a pointer to this problem?
The Delete key does not work as normal in my application. e.g. The Delete key has no effect in an editbox (i.e. it will not delete highlighted text) but Shift Delete does work. This seems to be the case thoughout the application. I have disabled all keypreviews and OnKey events in case they were causing it but the problem persists.
Can anyone suggest where I might look for the problem?
Running Windows 10 Delphi 10.3.3
If this happens only in this particular application, it is likely that you have a TActionList or TActionManager with an action using Delete as its shortcut, or a simple menu item with such a shortcut.
For instance, you might have an Edit menu with a Clear item using Delete as its shortcut:
Then that action or menu item will respond to Delete, not allowing the focused control to do its own thing.
This kind of mistake is surprisingly common. For instance, in the Delphi IDE, you have an edit field above the editor, showing you the current class:
If you select this text and press Ctrl+C, you expect it to end up in the clipboard. But no! Instead, the selected text in the code editor (if any) is copied, even though the code editor didn't have keyboard focus.

Is there a way to organize Delphi XE2/XE5 tabs editor in multitabs?

I have a lot of files to keep open, and the current single line of tabs is just difficult. I see that GExperts and CNPack does not have that (unless I missed that).
Is there any trick to achieve that, or any other suggestion that I could have more tabs visible?
The TIDEGradientTabSet (if it's still used in modern Delphi) doesn't support multiline view, so the only option for those IDE experts could be making own tab set control hiding the original one.
Alternatives are:
On the far right of the tabs is a small down arrow. Press that, and you'll see a list of all the files that are open in the editor;
Pressing Ctrl+B will open up a dialog to select a tab;
TMS has a free tool AltTab but it did not get update for while. That was exactly what was needed for Delphi IDE;

Xcode 5.1 method search only allows one character?

I've recently upgraded to Xcode 5.1 and I'm experiencing the most annoying bug. The instant search or method search dialog that allows you to search the methods on the given source file you are looking at isn't allowing me to enter more than one character. I have large source files and I tend to rely on that a lot. Any idea why this might be happening. I've tried re-installing Xcode (simply be dragging it in the trash).
You can find the search field I'm talking about by clicking the method as shown in the screenshot and simply typing something.
When I type the character gets replaced with the last letter entered.
(This one's just informational: I don't think it will fit in a comment, and want to report on what suggestions worked and didn't.)
I ran into this same problem. I accidentally typed some other key combo when trying to do Ctrl+6 to open the Document Items dropdown, and it was all out of whack after that.
As clance_911 mentioned, the filtering would work after clicking in the search box. So for example, to filter for "init", I could hit Ctrl+6 to open the Document Items, type "i" to start filtering (but then any subsequent letters would replace the i), click into the search text box, and continue typing the "nit". This works, but it's a pain.
As Moze pointed out, this seems to be specific to external displays. Sure enough, it worked fine on my MacBook display, but if I moved Xcode over to the external display, it stopped working. In my case, dragging the menu bar in the display Arrangements settings (to make the external monitor the main display) did solve the problem: the filter worked correctly with Xcode in either window. Sorry, Etienne :-(
The other solution that worked for me was simply closing the MacBook: use it in clamshell mode with only the external display. This is my normal setup anyway, but I know that's not ideal for everyone.
It happens if Xcode is open in external display that is not main display.
To fix it, open display setting's Arrangement tab and drag menu bar to display that you are working on.

Delphi toolbar button to switch between unit and form view disapppeared?

Two buttons on the view toolbar in Delphi disappeared and I can't get them back. One of those buttons is the one to switch between code/unit and the design/form view which I use all the time. The keyboard shortcut for switching (F12) still works, but I have one of those pesky media keyboards where you have to press a function key to access F-keys, so I'd really like to get that toolbar button back.
I tried resetting all the toolbars and their contents, and I see space where the buttons should be, but they aren't there. In the customize dialog for the toolbar, the commands don't seem to even be there anymore.
I tried doing a "repair" re-installation of Delphi, but even that didn't fix it. Has anyone else had this happen before, or have ideas on how to repair or reset my IDE?
edit: perhaps it's worth mentioning the menu options to toggle between code/unit and design/form view are also missing.
As best I can tell, this problem (missing view unit/form button and menu option) could possibly be a limitation of the starter edition of Delphi (this forum post: https://forums.embarcadero.com/thread.jspa?threadID=83324 ) seems to indicate an XE3 user with starter edition has the same missing buttons on their toolbar.
I did discover at the bottom of the screen there are tabs to switch between code, design, and history, which does at least give a mouse-based workaround to toggling between the views without having to expand the file view and click the right pas/dfm file. And the F12 keyboard shortcut does still work as well.

Resources