How to increase Length of a ComboBox item in MFC - winapi

I have created a Dialog application using MFC. I have an CComboBox in it, I am able to enter an URL of Length 60 characters. But when the length increases , I am unable to enter.

CBS_AUTOHSCROLL allows adding more characters in to combobox's edit control (simple or dropdown style).
You can set this flag when combobox is created. However there is no effect if you modify this flag after combobox creation.
In dialog resource editor, this flag appears as "Auto" in comboxbox properties.
Combo Box Styles:
CBS_AUTOHSCROLL
Automatically scrolls the text in an edit control to the right when
the user types a character at the end of the line. If this style is
not set, only text that fits within the rectangular boundary is
allowed.

Related

Is there a way to change the font size in the serch dialog Find and Replace with fields

Is there a way / settings to change and / or increase the font size in the search / find dialog (field where text is typed, not talking about the label) ? Example with long regexp, it becomes non readable at all, (stupid) example:
Find: ^/drive/www-root/aw/([a-z0-9_]+)/(.*)xml$
Replace with: # necho " " >> /drive/www-root/aw_files/xsltproc_1.done nxsltproc -o /drive/www-root/aw/1/2html /drive/www-root/aw/resources/1.xslt /drive/www-root/aw/1/2xml
enter image description here
Thanks
Although you can't specify the font size in the Find box to any arbitrary size, you can make it use the same font size as the editor. To do this, select Customize on the Tools menu, select the Search page, and ensure the Change Font for Find/Replace Drop-Down List option is set, and the Change Font only if Character Set of Selected Font is not System Default is clear.
An alternative way for such tasks:
EmEditor can grab text from such controls via its tray icon app (emedtray.exe).
Run emedtray.exe;
Add a hotkey for Grab: http://www.emeditor.org/en/dlg_tray_index.html
Then click (to set focus) in the field you want edit; Press the hotkey;
The text in that field should be grabbed into EmEditor main window;
Then you can view/edit it with the abundant functions EmEditor provides (including Ctrl+wheel to change font size);
After editing, just close that window, the edited text will be sent back to the source field.

Automatically leave field after value is entered

I am creating a form in Visual FoxPro where the user will be entering a large number of values that are only one character values. So that the user does not have to press tab after every key press, I would like to setup the form so that once the value is entered the cursor automatically goes to the next field.
What is a good way to do this?
Make sure you have SET CONFIRM OFF
From the help file:
SET CONFIRM ON | OFF
...
OFF Specifies that the user can exit a text box by typing past the
last character in the text box. The insertion point, when it reaches
the last character in a text box, moves to the next control, and the
bell is sounded (if SET BELL is set to ON).
OFF is the default value of SET CONFIRM.
SET CONFIRM OFF also affects menu items and menu titles. If SET
CONFIRM is set to OFF, the user can choose an item from a menu or a
menu title in a menu bar by pressing the key corresponding to the
first letter of the menu item or title. (When SET CONFIRM is set to
ON, this action only selects the menu item or title.)
I made a simple form with two text boxes and verified that after typing one character, it jumps to the next text box.
Herb's answer is correct, but keep in mind that the cursor will jump to the next field in the TAB Order.
So if you entered your Textbox fields in some other order you might need to re-order the TAB's.
To verify that you have your TAB Order as you need, with the Form open in the VFP Development environment, from the Menu, click View - Tab Order - Assign Interactively. Then using your mouse, you can re-order the TAB settings for your Textboxes.
Also note that the TAB Order also includes the other Form objects such as Buttons, Grids, etc.
Good Luck

Enterprise Architect - simple UI Tab Control

Is it possible to change number of tabs and tabs name in simple UI Tab Control? How to do it? (user interface diagram)
I'm using EA 11.
No. Tab 1 | Tab 2 | Tab 3 is part of the element's image and you can't change them. There is a workaround which works visually, but won't help if you're looking to generate code out of your models.
Create a Text element (in the Common toolbox), and give it the name of your GUI's first tab.
Set a different default fill and text color for the Text element (Right-click and select Appearence - Default Appearance).
Pick the Fill and Border Color for the Text element that best matches the Tab Control's foreground, either in the diagram toolbar or the Text element's context menu.
Move and resize the Text element to cover Tab 1.
Repeat as necessary for the other tabs, using the appropriate color.
The Text elements are local to the diagram they're in and are not shown in the project browser (they are diagram objects but not proper model elements), but they move with the Tab Control so it works visually.
By making several copies of the Tab Control and varying which Text element has the foreground color, you can use this technique to show the different panes.
You can change number of tabs and selected tab this way (at least in EA 13):
Open Properties of the Tab Control;
In "General" select "Wireframing" tab. You'll see "Tabs" property with a value "Tab1";
Select this "Tabs" property and click on "Notes" menu. An editor appears;
In this editor you can change number of names of tabs;
Close editor and for "Tabs" property choose selected Tab;

Text should not be displayed behind the button VC++

I am designing a search text box, with close button at the end(will be shown when TextLength > 0).
But when entering lengthy text, the close button hide the last part of text. I need to restrict the text to not cross the close button.
Note: I dont wont to restrict the MaxLength of characters, but the max length of characters to be displayed inside the textbox.
It appears that the close button is overlapping the search text box.
If you are using MFC, then you can use CEdit::SetRect to set the formatting rectangle of edit text. If not MFC, then use EM_SETRECT message to do the same.
I have done similar stuff in my article here: http://www.codeproject.com/Articles/15043/iTunes-like-Find-Edit-Control

vb6 text control when property set to multiline cannot hightlight text past box length, have to use right directional key

When I set the multiline property of the text control to true, when in use, if the text control is used as a basic one line textbox and the text typed in goes past the length of the box, it only highlights text up the end of the box, you have to press the right arrow key to highlight the rest. I need the multiline property set to true because in some scenarios it is necessary. I've thought of creating the text control twice with the property turned off in one and on in the other but wanted to know if anyone knew a solution?

Resources