So I am trying to take a column of text data and replace that data with edited information. I am trying to manipulate values in a fixed width file. I want to leave the rows intact. I know I can hold ALT and select a whole column of information but when I try to paste into the selected area Notepad++ just adds the information above the first row and deletes the column Ive selected. Please help, I have been researching for a while now and cant find anything on this.
Below I will try to explain a bit better, if I were to select the asterisks using Alt+mouse and I have a column of data that I have copied from another file how could I replace the asterisks but leave the other data intact?
1111122222**22233333333333
1111122222**22222223333333
1111111122**22222223333333
If I understand the question correctly, you have copied the column of data from somewhere else and want to copy it as a column into notepad++. If you simply select a column in your notepad++ document and try to replace it with the external column, you will get many copies of that column. The trick is to first paste your column into an empty document (or into new lines in an existing document), then select that column you just pasted in but make sure you select it in column mode, i.e., while holding down the Alt key, and then copy it with Ctrl-C. Now you can column-select the column you want to replace and copy in your copied column with Ctrl-V
You can use ALT + Mouse to select the columns to copy the data and replace it. This animated gif is self explanatory.
If I understand your question correctly, you want to paste a certain text in front of all columns you've selected ?
Either use ALT + Mouse or SHIFT + ALT + up/down arrow to select the desired number of columns.
Either use ALT + C or Menu Edit -> Column Editor to enter the Column Editor.
Fill in the "Text to Insert" and press Ok.
Good luck !
Edit: as pointed out in the comment, this is actually answered in Notepad++ How to paste string across multiple lines
ALT+Mouse works alright for me. I was able to replace the asterisks with other charactes. Maybe we have diferent versions? I don't think so, though.
Make sure you are also using Alt+Mouse when you select the information you want to copy. Not only when you paste it.
I hope that helps you.
Good luck!
Replacing a column with new data is easy:
Hold ALT + select with your mouse the column (you already did that)
Press DELETE or CTRL + X to remove the old column
Leave the cursor flickering in the same position (or wherever you want to add the new column)
Paste CTRL + V
Note: you must NOT have your column selected when pasting. I think that's what confused you.
Copy required text(columns) with Shift+alt and mouse (or arrows), then paste as required with ctrl+v.
Related
I'm using a QTableWidget with four column witch i programaticaly fill with QTableWidgetItem in a loop. it's working but the full text is not displaying, it show three dots instead like there isn't enough space:
if i double click on a row it will display the whole text:
How to set QTableWidgetItem programatically to fill all available space, or disable the 3 dots system and just display the whole text event if it will overflow ?
Here my simplified code that just fill the second problematic column:
vector<OperationLine> lines = db->getOperationLines(ui->dateEditFrom->date(),ui->dateEditTo->date());
ui->operationTableWidget->setRowCount(lines.size());
ui->operationTableWidget->setTextElideMode(Qt::ElideNone);
for(int i=0;i<lines.size();i++){
QTableWidgetItem* libelle_item = new QTableWidgetItem(lines.at(i).libelle);
libelle_item->setToolTip(lines.at(i).libelle);
setDocumentMode(libelle_item);
libelle_item->setSizeHint(QSize(500,50));// <-does not seem to work
ui->operationTableWidget->setItem(i,1,libelle_item);
}
ui->operationTableWidget->resizeColumnsToContents();
ps: OperationLine is a simple class and .libelle is just a QString. Manualy resizing the column does not help. I also tried to disable editing and it does not help either. However if i comment my loop and manualy add item with QtCreator it seem to work as expected.
My original string contain return lines, removing them like:
QString s = lines.at(i).libelle;
s.replace('\n',' ');
ui->operationTableWidget->setItem(i,1,s);
is working.
As #Scheff'sCat pointed out in the comment of my original post, using the accepted solution at How to prevent too aggressive text elide in QTableview? work too and will display multiple lines withouts the dots in the wrong place.
I am looking to create a conditional formatting function that will highlight "C2:E2" if "E2" > 5000 & "B2" does not contain the word "treasury".
any help would be appreciated!
try on range C2:E:
=($E2>5000)*(NOT(REGEXMATCH(LOWER($B2), "treasury")))
Navigate in top menu to Format -> Conditional formatting
There you can specify range as E2:E29
Use conditional formatting with just one AND formula that refers dynamically to the values of the same row, but different column
AND comparision of the current value
=AND(indirect(address(row();column()-3))<>"Treasury";indirect(address(row();column()))>5000)
This can maybe be simplified, but definitely works with more conditions at once.
Some explanation:
To avoid typing new formulas for each row, we use INDIRECT joined with ADDRESS
column()-3 refers to current column (the one you call formula in) . Have in mind that means for each columns (C->E) you need a different formula that refers to another column for checking if it contains "treasury". In your case you'll need different formulas for column C,D and E. column()-3 works for E, because Treasury is in B column (3 columns earlier from E)
P.S: translating from my native language, so not sure if English UI is the same, but should be intuitive from here.
You'll want a custom Conditional Formatting Rule.
Click in cell C2, then from the menu choose:
Format > Conditional formatting
In the dialog box, set your range:
C2:E29 (or change 29 to whichever row is the last one you want to include in the formatting rule)
Under Format rules > Format cells if..., choose the bottom option from the dropdown menu: "Custom formula is."
In the field below, enter this formula:
=AND(NOT(ISNUMBER(SEARCH("treasury",$B2))),$E2>=5000)
Set your formatting style and click Done.
I want to make a list of n rows with m columns. Last column must contain a button which on clicking deletes the entire row which that button belongs to.
Click here to see my desired GUI.
I have already looked for wx.grid and didn't get any success.
My questions are
Can this be achieved by using wx.ListCtrl?. If yes then how?
Which is the best wx widget other than wx.grid to achieve this.
Any sample code or illustration will be appreciated.
Thanks
I am creating an excel sheet with following Data Validation drop down list.
NA
Done
(add some formula here)
Basically, i will be able to select either plain text "NA"/ "Done" from the dropdown list. But sometimes, I want the user to be able to calculate some values based on the cell respective to the row selected so, I want to have one formula as a choice inside the data validation dropdown list. Is this possible?
Data Validation List Source
When I click on Formulae option, it should execute the formula with respect to the cells in that Row
But currently, the formula that i put in doesn't execute, instead it will just show the whole formula in the cell when activated.
1)How can i make it so that when i select the formula from data validation list, it will execute it instead of filling up the cell with it?
2)How do i set the formula so that it will be using the cell from the current Row? (for example, if i am using the data validation List in N60, the formula should adapt itself to use the cell (let's say A60?).
I may not be able to help with the second part, but I was seeking an answer to the first and discovered a solution/workaround using Name Manager.
First, in Formula > Name Manager, create a new reference (the "refers to" will contain whatever formula you are wishing to ultimately display in the validation list. For this example, we use the formula reference "=IF($H54=..." and Name it "UniqueName"
Now, we go into Data Validation, Select List, and input the three items we want displayed in the list, with an equals sign preceding our newly named reference: ie. "NA,Done,=UniqueName"
Note: You can't start with the =UniqueName or validation will try to read it all as a formula and fail.
This method will allow the user to display "NA", "Done", or "=UniqueName" in the cell; if "=UniqueName" is selected, the cell itself will interpret this as a formula and execute it accordingly, displaying the results of "=IF($H54=...", or whateverelse you have designated to use as a named formula.
If it's too late for yours, I hope this helps someone else who may face a similar problem.
While I think I know what you're trying to say. Why don't you just use an IF formula to evaluate everything instead of selecting a drop down for every row manually. You already had it partially solved using IF. Just need to add the criteria for a "Done" and an "NA"
=if(A1="date","Done",if(A1<"date","NA",if(something else until you have all your catergories))
Just going to piggyback off of Mark's response.
If you really needed your named formula to be the first selection in the list, you can setup your list with a leading comma like so:
,=UniqueName,NA,Done
That worked out for my use, and there was no null item listed in the Data Validation drop down. Hope that helps!
I have a table with styled column headers.
Header height is limited so the headers are actually narrow.
The header has also the sort indicator (the default arrow/triangle).
When the user changes the width of a column such that it is smaller than the text's width, the text is trimmed with 3 dots at the end. E.g. "Universi..."
So far so good.
The thing is the sort indicator hides part of the trimmed text.
Imagine wide column - the text is fully show and the sort icon is on the right and everthing looks good. Now the user resizes the column. Just before the text is trimmed with 3 dots, the sort indicator starts to hide the right side of the text. At some point the text is trimmed with the sort indicator on top of the 3 dots . E.g. "Universi.▽" or even "Univers▽".
It looks like the header does not take into account the sort sign.
Is there a simple way to set the sign indicator to not overlap the trimmed text e.g. "Univer... ▽"?
I need the columns to be resizable and sortable.
I don't want to define a special widget with push button and text box and handle events and trimming and so... it is a serious overhead.
Thanks
This is a bug https://bugreports.qt.io/browse/QTBUG-629
Which should be solved in Qt 5.4 https://codereview.qt-project.org/#/c/99900/