nstableview + cannot show partial file names - cocoa

I am using Table View Control. In the control, I show File/Folders details, if I reduce the size of file/folder name column, it does not show partial file/folder name (whatever characters can be shown in the Column).
If a file name has multiple words in it, if enough space is not there to show a word then that word does not get shown at all, instead of showing some characters in that word (Either a word gets shown completely, or not at all)
I want to know how to resolve this issue.
Thanks so much.

Set the line break mode of the column's text cell, using either the Attributes inspector in IB or a setLineBreakMode: message to the cell.

Related

How to sort emails data using its color codes in emeditor

I have this little challenge.
I want to ask, how do i sort the emails using the color code (light green) as stated in this picture here
I have tried to remove the non emails by scrolling through, but i need a solution that can make it a one click through sorting.
I will appreciate your kind response.
Open the Replace dialog box and enter the following regex in the Find field:
^((.*#[^\.]*)|([^#]+))$\n
Change the radio button to Regular Expressions. This regex pattern finds any line without a dot after # or any line without a #. Note that you need the last line of the document to be empty as shown in line 7 of your document.
Since we are deleting those lines, the "Replace with" field is blank. Now click Replace All.

How do I tell PowerPoint to map two placeholders when switching slide layouts?

I start with a working example:
Open PowerPoint with a blank presentation.
Right-click the title slide and choose "Layout - Title and Content".
You see "• Click to add text"? Click and add some text.
Right-click the slide again and choose "Layout - Two Content".
See how smart PowerPoint can be?
The text you entered in the single placeholder before is now in one the of two placeholders.
Specifically, the left one.
My questions:
Why? (And not in an extra one?)
Why? (And not in the right one?)
My questions arises because I have received a set of master slides in which the above is not working, and I am trying to repair it without having to regenerate everything.
This is a site for programming issues, but the background behind this issue might be sufficiently complex. Modern PowerPoint files are XML. In the XML for each slide layout, each placeholder has an idx reference number. PowerPoint uses these on numbers to decide where to place content.
Lazy Designer Syndrome is the cause of what you're seeing. Instead of creating new placeholders in order, so the idx numbers would increment in a logical order, the designer has copied and pasted placeholders to avoid extra formatting work. The pasted placeholders all have the same idx number. As a result, PowerPoint has no idea of placeholder order and inserts content randomly.
This isn't always easy to solve without editing the XML, but you can try deleting all but the leftmost placeholder. Then create new placeholders by inserting them one at a time and reformatting them manually to match the first.
At first my attempts to follow the above failed, but now I got it working as well.
There are two different, but similar tags, id="" and idx="".
All objects in the slide has an id="" tag, this is not the tag to solve this problem.
The idx="" tag is only on Placeholder objects, except the those of Type=Title.
As described above you can set it to an integer value 1 and greater (I assume).
Make a plan for what Placeholder objects should be replaced across your layouts. I think of these as "groups" or "families", then assign the idx-values consistently throughout your slide layouts.
These "groups" or "families" of placeholders needs to be compatible for this to work, i.e. matching Type. The absence of Type means the placeholder is a general Content Type and match all Types.
During layout change, if Placeholders has incompatible Type while having the same idx-tag, PPT will look for the next Placeholder with matching Type.
#JohnKorchok's accepted answer provides the technical details for the procedure described here. Note that I only had "Content Placeholders" in my presentation.
Install 7-Zip and your favorite text editor (you can use one with an XML formatter, which will simplify things, but it's not required).
Open your file.pptx in 7-Zip (no need to rename to .zip, just right-click and "Open Archive")
Navigate to ppt/slideLayouts.
See a list of slideLayout....xml files.
Identify the ones you want to edit, e.g., by opening each one and looking for <p:cSld name. (The numbers may be indicative only of the order the layouts have been created, not of the order in which they are now shown in PowerPoint - although saving a .pptx files in PowerPoint 2016 does modify the slide layouts for me so that the display order matches the file name numbers.)
Look for <p:ph until you find the ones you want to edit. You probably want to ignore the ones with type="title", type="ftr", type="sldNum".
Change the idx of all other placeholders to 1, 2, ... in the order in which you want them filled (use the <p:cNvPr ... name= to identify the placeholders).
Save the .xml files, close your editor, and be asked by 7-Zip to update the archive. Answer "Yes".
So I set the idx to 1 for the one placeholder in my 1-content layout, to 1 for the left placeholder in my 2-content layout, and to 2 for the right placeholder in my 2-content layout.

MigraDoc PDFSharp Table overflow text

I am creating a big table with MigraDoc.
I have two issues I don't know how to solve exactly:
If the content (Paragraph) of a cell is too long it breaks and I got 2 lines in my cell. I don't want this behavior. I want that the text which does not fit in the first line of the cell is hidden.
If a word is too long I want also that the characters which are outside of the cell are hidden. Now they are displayed in the next cell :/ and are overlapping with the content of the next cell...
Do you know how to fix this issues?
This behavior is by design.
Use MeasureString to measure your text before you add it and truncate at the correct place (maybe adding "..." if you want).
See also:
http://forum.pdfsharp.net/viewtopic.php?p=6158#p6158

Disable wrapping for some lines but not others

I have a NSTextView subclass. It displays normal text (which should wrap, ideally around the 80-char line) and ascii style tables (which should not be wrapped).
Mockup:
As you see the text on top is wrapped, while the table extends.
I have code that figures out if a line is a table, but I need some ideas on how to go with the selective (non)wrapping.
Use multiple text containers with your layout manager.
"This one is the width of the text view (it wraps); the next one is as wide as it needs to be (doesn't wrap); etc."

NSTextView with custom space width

I need to implement custom space separator with custom width between two part of paragraph in text view:
AAAA AA A -------- BBB BBBBB B
This is separator must be included as non-editable character. So user can't delete it or modify.
I understand, that i must overload standard behavior of textview in some points (for example, when user press "delete" right after separator nothing will be deleted)
I have several ideas how accomplish this task:
Use elastic glyph attribute (there are mentions in documentation about it). But I can't find any documentation about how to use it.
Use tab symbol and NSTextTab for each paragraph, and in any modification to the paragraph recalculate position of tab.
I will be very grateful for any right direction.
I had a similar problem and wound up inserting blank images of the desired width into the textview. The code for implementing this is here:
Changing the width of the space character in NSTextView

Resources