Text should not be displayed behind the button VC++ - visual-studio-2010

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

Related

Drop-down list in Word doesn't look like it

Using Word 365, I entered a drop-down box into a document. I added entries to the list, and it works fine, but it looks like this:
That word "Select" is all that is visible of the drop-down. No arrow button, no border, nothing.
Why can't I display the drop-down arrow?
Is there a way to make the border visible?
Your only option I am aware of is to change the Show As property on the Content Control dialog to Start/End Tag.
This will clearly distinguish the control from other surrounding text in the document.

How to increase Length of a ComboBox item in MFC

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.

Able to remove non-editable text in CKEditor by using right and left scroll

I have some text in CKEditor which should be editable and some text which should be non-editable.
The non-editable text I am enclosing in a span as below.
<span contenteditable="false" unselectable="on">Here is where my non-editable text goes</span>
The editable text I am enclosing in a span as below.
<span style="background-color:Yellow">$[insert Date]</span>
Here we are using style background yellow to highlight the editable text in yellow to the user.
I put my cursor within the editable text and move using the left or right arrow keys. Once I move outside the editable text area, I am able to remove even the non-editable text using backspace.
The issue is that as soon as my cursor moves outside the editable text area the code isn't able to detect any key press due to which I am not able to restrict the backspace or delete.
Does Range functionality help in this issue? If yes please help and give an example of where we can use the Range code.
EDIT:
It came to my attention that there is a $nonEditable dtd descriptor that could also come in handy:
https://docs.ckeditor.com/ckeditor4/latest/api/CKEDITOR_dtd.html
https://ckeditor.com/old//forums/CKEditor-3.x/Forcing-custom-element-be-BLOCK-level-element
PREVIOUS:
You could use the widget functionality to make the text ineditable-- using contenteditable="false" in CKEditor can be a bit unpredictable, but the creating a widget extension plugin can have really nice results.
It would be a very basic widget that simply uses the upcast checking if the element has 'unselectable="on"', then the text will automatically become uneditable and using the arrow keys will simply skip over the text instead of entering it. You also get quite a bit of other functionality with the widget plugin and it makes it much easier to integrate into things like events, dialog editing, etc.
You can get a widget creation tutorial here:
https://docs.ckeditor.com/ckeditor4/latest/guide/widget_sdk_tutorial_1.html
For more information, I just answered a question about making parts ineditable here:
How can I create uneditable fields on CK Editor?

Microsoft Word Highlighting Text White

For some reason, whenever I create a Text Box and start typing, the background text is highlighted white and I can't make it transparent. This picture should explain everything:
I want to remove the highlighting so the gradient in the background shows through. I used to do things like this a lot, but for some reason Word won't let me now. Any suggestions?
I am on Word 2011 Mac
Got some clues here and finally found a solution for MSWord for Mac version 16.9:
Select the text you want to fix
Select "Design" Tab
Click "Page Borders"
Click the "Shading" Tab
Select Apply to "Text"
[Fill] is showing "No Color". Open the selection and re-select "No Color"
Hit "OK"
Worked for me. It is obviously a bug in Word.
Right-click the text box that you want to make invisible.
If you want to change multiple text boxes, click the first text box or shape, and then press and hold SHIFT while you click the other text boxes.
On the shortcut menu, click Format Text Box.
On the Colors and Lines tab, in the Fill section, click the arrow next to Color, and then click No Color.
On the Colors and Lines tab, in the Line section, click the arrow next to Color, and then click No Color.
Click OK. Your textbox's background is now invisible...
It seems the actual text highlight is your problem, so try:
Go into Borders and Shading, apply it to text, and set it to clear. Had me confused because I've never had to do this before.
As seen here.
I also searched around and had trouble finding this.
In Word for Mac 2011
Highlight the text
Click tables in the ribbon
Find the shading icon (looks like a paint bucket)
Click the down arrow next to the bucket and select No Fill
Change the text format from anything apart from Normal text.(important)
Solution 1
Select the Text box and go to the "format" tab,
modify the outline and fill options
if this isn't enough
Solution 2
select the Text box and right click for options
select the last option "format shape"

Jqgrid edit row auto-resize option

Do we have a auto-resizing option for jqgrid edit mode. I use edit cell and say if the user has large text then, on double click it enters the edit mode, its likely that user cant read the text because that looks like text field is of fixed length. Is there a way we can resize it so that user can see the entire content/text.
If you are finding inline edit too restrictive, you might want to consider opening a dialog to edit a row instead. For example, the dialog could have plenty of space for your large text field.

Resources