Beyond Compare 4 - Not showing the proper aliment for differences - beyondcompare4

Hi All I am comparing two text files , using beyond compare V4 and it is showing differences as below snapshot.
Right file does not have CollectionCash and left file does not have CollectionsCO values. It should show blank/missing lines for values which are not present in either of files. I want to compare based on the first word fully matched in lines. I tried different rules but no luck. Please suggest how can i achieve this.
Thanks

Beyond Compare's default Text Compare settings align based on partial matches. To only align exact matches:
Click the Rules toolbar button (referee icon).
Go to the Alignment tab.
Check Never align differences and click OK.

Related

Change Style of ListBox

In Outlook 2010 I have a UserForm with a ListBox.
This ListBox has 4 columns where I show a list of attachments (the columns "File-Name", "File-Type", "File-Size" and "Target-Directory".
Unfortunately the ListBox is restricted in layout functionality, the user can not adjust the column width at runtime (so I have to specify the width of the columns by design).
Because the file path can be quiet long, I set the width of the last column to 999 Pt.
So my ListBox has a horizontal scrollbar.
I want to have the following layout changes to my ListBox:
Add column headers
Change the alignment of a column to right-aligned
Optional: allow the user to sort the list by any column
Optional: allow the user to sort change the width of any column
Optional: show a grid in the ListBox
For 1. I found some answers that this is very complicated and I should use static labels above the list instead.
This is not possible, because my ListBox can be scrolled horizontally.
Is the ListBox really so restricted or is #1 and #2 possible somehow?
I know that there are foreign components available, but I am not allowed to buy any component.
And my solution should work at my colleagues too, so they would also have to install these components.
I have been experimenting with possible solutions to your problem. I think I have taken the listbox approach as far as it will go so I will share what I have discovered.
I can find nothing on the web to suggest that anyone believes you can have listbox column headers without using property RowSource. To use RowSource, you set it to an Excel range.
I got Outlook to create an Excel workbook and to write some data to it. Unfortunately, I could not find any way of getting an Outlook user form to access an Excel range. The syntax for setting RowSource is:
ListBox1.RowSource = "Emails!A2:D20"
This is not the standard syntax for a range and I have failed to discover any method of extending it to include a workbook name.
Jonah_Hess describes an interesting approach in https://stackoverflow.com/a/43381634/973283. He has two list boxes. One is a one-line listbox that contains the headings and the other contains the data. The two listboxes are set to the same number of columns with the same widths. This gives an attractive appearance but if you scroll the data listbox, the headings listbox does not scroll with it. This is not really any different from placing labels above a single listbox.
I tried putting the headings and the data list boxes in a frame and scrolling the frame but could not get it to work. I have used frames with VB user forms but the functionality is very different so there are no lessons learnt that I could bring to a VBA user form. Perhaps someone more familiar with VBA frames could get this approach to work.
I gave up trying to get a solution in Outlook. An Excel macro can access Outlook data so I tried that approach.
I created a macro-enabled workbook. Within it, I have two forms both of which fill the screen to conceal the worksheet. The first form just says: “Please wait while I load data from Outlook”. I am not clear about the data on your form so I imported selected details from a folder full of junk emails which I wrote to a worksheet. I sized the columns for the list box to match those for the worksheet. The result was:
The text is a little small but I think it is readable. The listbox at the bottom allows me to select emails for different periods. Long ago I had problems with RowSource which meant I could change the values in the range but I could not change the size of the range. I have either managed to avoid that problem today or it was a bug that has been fixed.
You can see that the headings are displayed. The columns are a little wide but I consider them to be a reasonable first approximation. Options to change the widths would be easy to implement.
The changes you ask for:
Add column headers. Done
Change the alignment of a column to right-aligned. Possible but difficult. You would need to pad the text with an appropriate number of leading spaces.
Optional: allow the user to sort the list by any column. The data is in a worksheet so easy.
Optional: allow the user to change the width of any column. I have set the column widths at runtime to show it is possible.
Optional: show a grid in the ListBox. Not possible.
If the above is interesting, I could show you all my code and instruct you on creating the forms so you could duplicate my experiment. Alternately, I could just explain: how I imported the Outlook data to Excel, how I included the column headings and how I set the column widths.
I cannot find anything to suggest that anything better can be achieved with listboxes.
An alternative approach is to use a grid of labels. This can give an attractive appearance and one or more columns could be right-aligned. Using the Controls property of the user form, you can treat the grid as a two-dimensional array. I have used this technique long ago and found it attractive and not particularly difficult.
In order to set the alignment of a specific column to the right, trying the opposite way might help you:
Set TextAlign attribute of the listbox to "3-fmTextAlignRight".
Add spaces at the END of the each data in the column of sourcearray, which you want to align LEFT. The number of added spaces should be so large as to exceed the width of the column in which the data appears. You don't have to mind whether the number fits to the columnwidth (overflown spaces do no harm). You may prefer to use & String(30, " ") instead (30 is just for example) .
If added spaces seem to be wholly ignored (i.e. data appear right-aligned only), further add any single character (such as "_") at the end of the spaces.
This is a cosmetic solution, but works when seeing left-aligned figures is too annoying.
After doing the above, please be careful when selecting from the list (trimming the added spaces, keeping BoundColumn data intact, etc.).
This trick works for both Excel and Outlook (not sure for other applications).
Test result in Outlook VBA (...trailing 50 spaces are added to data in column 1 and 4.)
Hope this helps.

Get the left indentation of a line above the selection - VB

I have to format a text based on indentation.
The steps are :
User selects a table on a page
Presses a button
The table gets indented exactly as the text above ( no gaps at all)
I know MSFT gives little less indentation to the table, so they look little askew.
I know how to change the indent of the selected table by the command
Selection.Tables(1).Rows.LeftIndent = <Value_as_that_of_the_text_above>
but I don't know how do I get the indentation of the text above, considering only table has been selected not the text above. Any help is appreciated.
You will need to get all the paragraphs of the document(try this). Then get the last paragraph on the page indent.

Comparing two files using BeyondCompare - check for content

I have two text files containing many lines of data (they are just some linux paths). The order of the paths are different in both files. I need Beyond Compare to compare the files based on content. Right now, it is checking line by line and pointing out errors if the same content is not present in the corresponding lines. I want beyondcompare to go through the entire file before saying that some path is missing. How to do it?
You can make Beyond Compare 4 sort the files before comparison. Open the files in the Text Compare, then click the dropdown on the right side of the Format toolbar button and select Sorted.

Creating OpenerView in a Notebook for Various Section of the Notebook in Mathematica

I have a notebook with various sections which I would like to contract (i.e show only the title of the section/subsection etc...) and expand as needed to reveal more or less of the content of the various parts (as done in the help section of Mathematica for instance).
I see the function OpenerView creates the icon but appears not to be suited for the purpose.
How do I accomplish that?
From the menu, try "Format->Option Inspector" and select "Selected Notebook" from the drop-down menu. Then in the search box type "opener", and make sure the "ShowGroupOpener" is checked. Then put the parts of your document into "Sections", "Subsections" etc. using the "Format->Style" menu options.
The blue brackets on the right side of the page are cell brackets. They show you want can or will be collapsed. Double click the one that surrounds the block you wish to collapse, or select the section and press: Ctrl+'
If you wish to expand or collapse all of the sections within a section or notebook, select the range you want to affect (Ctrl+a to select all), then use:
Ctrl+Shift+[ to open
Ctrl+Shift+] to close
In the menu Cell>Grouping if Manual Grouping rather than Automatic Grouping is selected, then the sections you want to collapse may not actually be grouped. You can see what is grouped or not, by the blue brackets on the right side of the Notebook. This is what I attempted to allude to above. If you change the setting to Automatic Grouping, or group the cells manually using Ctrl+Shift+g, you should see the brackets indicate the group, and the commands above should work.
If you refer to this post,
https://mathematica.stackexchange.com/questions/265/easiest-way-to-use-showgroupopener-in-mathematica
it will likely have your answer. To enter the expression for the cell, use Cell | Show Expression. There you can turn on the ShowGroupHeader option.

Eliminate stray whitespace between textboxes on a report

I have 4 stacked textboxes in the body of an SSRS report and am getting a stray space / extra line between textboxes 3 & 4.
This is for an address block - name / title / email / website. Can't put it in a single textbox with intervening vbcrlf tokens because the email and website are links. I've tried formatting it to remove vertical spacing; also calculated the exact position by taking top + height to calculate the position. And of course I've tried positioning it so there are exactly 0 pixels between the text boxes. If I reverse the position of #3 & #4 the rendering looks the same so it isn't stray formatting characters in the data fields.
The solution is to wrap the stacked boxes in a rectangle.
I had this problem as well. It blew my mind until I started over on another part of the form. The new boxes worked perfectly until I moved them to the right of another set of text boxes which had some word wrap in them. I realized the wordwrapped boxes were directly related to the gaps I was seeing the set of textboxes to the right. I guess there's some kind of poor markup going on that tries to line things up horizontally and enclosing the set of textboxes in a rectangle protects them from it.
good idea on putting the info into a table - jumping off that idea - I'm going to construct a dynamic string in my query and output the dynamic string into a textbox. thank you for the idea, I don't know why I didn't think to do that.
Simpler thing is to just check text alignment - the default is "default" which appears to be centered. Changing the text box to the right to "left" fixed this problem for me.
Reduce padding property of the textbox.
Once dragging the textbox one closer to the other the tooltip shows convergence points between two textboxes - make tooltip show 0 points
it is best I could do to control the spacing