formatting

Formatting User Form Controls

怎甘沉沦 提交于 2019-12-12 01:52:29
问题 I am trying to format controls on each of my User Forms similarly, but what I have formats all controls on a User Form instead of just the labels or just the textboxes. Here is what I have: Private Sub UserForm_Initialize() FormatUserForms UFNewRequest End Sub Sub FormatUserForms(UF As UserForm) UF.BackColor = RGB(51, 51, 102) For Each Label In UF.Controls Label.BackColor = RGB(51, 51, 102) Label.ForeColor = RGB(247, 247, 247) Next For Each Button In UF.Controls Button.BackColor = RGB(247,

Display whitespace in a textbox as a different character

主宰稳场 提交于 2019-12-12 01:42:30
问题 How can I display all space characters entered in a System.Windows.Control.TextBox as some other character, such as a dot? · · · · e.g.: Enter your text: [abc······def] Ideally I would also want to display the dot in a lighter color than the rest of the text When the user enters whitespace, the textbox should only display something else. Ideally I do not want to modify the actual string. So the internal value of TextBox.Text should remain unchanged, and when the user copies the content to the

Split a line on every 16th comma

99封情书 提交于 2019-12-12 01:36:23
问题 I am using perl to extract "Yes," or "No," from a large CSV, and output to a file using this code open my $fin, "leads.csv"; my $str; for (<$fin>) { if (/^\s*\d+\.\s*(\w+)/) { $str .= $1 . ","; } } open (MYFILE, '>>data.txt'); print MYFILE $str; close (MYFILE); This is working correctly, and outputting data like this http://pastebin.com/r7Lwwz8p, however I need to break to a new line after the 16th element so it looks like this on output: http://pastebin.com/xC8Lyk5R Any tips/tricks greatly

How do I maintain the format of a text file when reading a text file through Python?

陌路散爱 提交于 2019-12-12 00:14:05
问题 I have a .txt file where it has a list of items that look like so: BLAH ONE TWO THREE FOUR I'm currently using Python to read that .txt file and print out the lines of text. The issue I'm running into is that the printed lines display the newline character of \n and a comma together. It looks like so when I print the data from the .txt file: BLAH \n, ONE \n, TWO \n, THREE \n, FOUR I've tried using a .replace("\n,", "") in an attempt to at least get rid of the unwanted characters, but that

Formatting Results of STUFF command that uses For XML Path to concatenate the information into one cell

隐身守侯 提交于 2019-12-11 20:28:06
问题 I am using a STUFF Command to pull in data from a column and concatenate them together into one cell. STUFF((Select CAST(v.ID as VARCHAR)+ ', ' From Source Where CriteriaIsMet For XML Path('')),1,0,'') as MonitorID What I am trying to accomplish is formatting the results at the end. The results from the code above come out like this: 12345, 23456, 34567, 456789, I am looking for the code to have a line break. I want them all to still be in the same cell and not broken up but when placed in

Slickgrid filter on formatted cell content

南笙酒味 提交于 2019-12-11 20:18:20
问题 For a new project we are using SlickGrid which is a very neat tool for displaying grid data. We are trying to implement a search box above the grid which filter the content of the grid. We're using a DataView with the grid and we can use the functions 'setFilter' and 'setFilterArgs' to implement the filter on the DataView. We also use custom formatters to format the content of the cells for some fields. For example the country is a country code in our data object (for example 'NL') but we use

Different “clickable” log items in Chorome Dev Tools console

人盡茶涼 提交于 2019-12-11 19:44:12
问题 When I console.log a javascript object or array in Chrome Dev Tools I get a nice and clickable "drilldown" tree representation where I can inspect the various values, their keys and values with all the syntax highlighting, (i) icon, .length shown etc. Is there some extension API for doing/changing this behaviour so it is different for some other classes/instances? My idea was to format Clojure data structures so one can inspect them the same way. EDIT: I know I can do a simple formatting in

Inserting Commas into numbers for both objects and input text fields

拈花ヽ惹草 提交于 2019-12-11 19:43:52
问题 Situation: I have a calculator that I'm developing using these formulas: // --- Math --- function national(){ x = Number($('#budget').val()); y = Number($('#percentage').val()); a = x * 2; b = [x*(100/100-(1/y))]*2; c = (x*(1/y))*4; d = (b+c)-a; e = (d/a)*100; f = (b+c); $('#one').text(Math.round(a)); $('#two').text(Math.round(b)); $('#three').text(Math.round(c)); $('#four').text(Math.round(d)); $('#five').text(Math.round(e)); $('#six').text(Math.round(f)); $('#input1').text(Math.round(y)); $

Default numeric format in Excel

人走茶凉 提交于 2019-12-11 19:02:57
问题 I have a web app that exports reports to Excel. It does this by sending the HTML of the report table to the clipboard, and then pasting it into Excel. Quick and dirty. And it comes through fairly well. Numbers are formatted as numbers, dates as dates, and so on. But the reports have negative numbers formatted to use parentheses rather than a minus sign, and when this is pasted into Excel, it changes to a minus sign. You can see this in action simply by typing (200) into Notepad, and then

HTML button moving on page refresh?

六眼飞鱼酱① 提交于 2019-12-11 18:58:17
问题 So I noticed this bug the other day where the button for the log in will move to a different location when the page is refreshed. However, if page is loaded from link, then it stays in correct position. I am drawing a blank as to why this would do this, here is the link and the code to my site. Website: http://www.clanrippgaming.net/ HTML : <div class="login_box"> <li> <?php define('IN_PHPBB', true); $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './forums/'; $phpEx =