I'm making reports in Business Intelligence Designer Studio (VS 2005). My reports will be viewed primarily on the screen, and I'd like to change my ruler to pixels instead of inches. Is this possible?
format is:
1pt = 1 pixel
1pc = 1 percent
1cm = 1 centimeter
1in = 1 inch
Related
Is there anyway in Visual Studio - in my case I'm using 2012 - to automatically format the amount of white space between code lines?
I know that pressing:
ctrl + k + f
Will nicely indent my code correctly, so is there an equivalent shortcut for white space gaps?
If you meant to have a feature from Word, 1.5 line space or double line space then Visual Studio does not have anything like it. The only way to achieve this is to change the font in editor to some that has abnormally large height.
I just installed the sdk and run in creating sample app project.
I ended up with a folder full of icons and 3 classes that were to show me how things work.
The problem I noticed is that the code creates buttons that should have a background image but only the text is visible. Images are in the same folder and spelling is correct.
The auto-generated code looks like this:
playBtn = widget.newButton{
label="Play Now",
labelColor = { default={255}, over={128} },
default="button.png",
over="button-over.png",
width=154, height=40,
onRelease = onPlayBtnRelease -- event listener function
}
playBtn.x = display.contentWidth*0.5
playBtn.y = display.contentHeight - 125
Also the text doesn't change color. When I added another button below with my image below the auto created one I was able to see my tiny part of my image in the top left corner. The button was also visible when moving to net scene. How come?
To help solve your color issue you need to change the values. Corona recently changed to decimal colors, the range is from 0 to 1 versus 0 to 255. Anything over 1 will result in a 1 being used for the color.
So basically your colors need to be divided by 255 to get the proper value. You can either have the code divide it or you can divide the value yourself. You can read a post about it here.
Is it possible to change the spacing between lines in the Visual Studio 2012 code editing area? After having worked with IntelliJ IDEA for a while, I got accustomed to a slightly larger line spacing (1.2), and I want to achieve the same effect in VS12.
For comparison, the top one is IDEA with 12 pixels spacing between lines, the bottom one is VS12 with 10 pixels spacing:
I find the IDEA version much easier to read, even if it's just 2px difference. Does anyone know?
I've found a workaround which works pretty well, partly alread described in this comment.
You need to download and install TypeLight (free for personal use), and open the Consolas.ttf file inside. To adjust the line spacing, go to Font -> Metrics -> Advanced and change the "Line Gap" to your desire (I changed "Type Line Gap" as well, but I have no idea what this actually does). I experimented a bit with a values and found around 730 to be similar to the 12 pixels spacing in IDEA.
To distinguish the modified font from the regular Consolas, I suggest changing the name of the font under Font -> Names (to "Consolas Spaced" or something). Save the font, double-click the file and choose "Install" from the preview dialog. Then (re)start Visual Studio, choose your modified font and you're done.
As of Visual Studio 2019 (16.10.0) it is now possible to change the line spacing directly in the options under Text Editor => General:
Can't change directly in Visual studio.
--> BUT You CAN change line height of font, the font you're using.
Step 1: install Fontforge.
Step 2: Open Fontforge after install finished, go to:
Element->Font Info ->OS2 -> Unit.
Change 4 value: Down win, up win, top N, down horizontal by multiplied by the desired ratio. Sample: ratio 1.5 or 2 ..etc...
(it means: if default 800, you multiple with ratio 1.5 --> result is 1200, you change 800 -->1200)
--> click OK to save setting.
Step 3: Go to File -> Generate font --> Generate with ttf format.
Step 4: Install the font just created and change font in Visual Studio.
VS 2010 seems to be updating my form's designer.cs file when I open the form in designer view.
For example, say I have a form with a label of type System.Windows.Forms.Label and I had created the label such that the designer file has (auto generated code)
this.myLabel.AutoSize = true;
this.myLabel.Font = new System.Drawing.Font("Tahoma", 8.25F,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.myLabel.Location = new System.Drawing.Point(**25, 63**);
this.myLabel.Name = "myLabel";
this.myLabel.Size = new System.Drawing.Size(**101, 13**);
this.myLabel.TabIndex = 1;
this.myLabel.Text = "A simple windows label.";
when I close out of designer view and open it again, VS 2010 will sometimes alter it to
this.myLabel.AutoSize = true;
this.myLabel.Font = new System.Drawing.Font("Tahoma", 8.25F,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.myLabel.Location = new System.Drawing.Point(**29, 78**);
this.myLabel.Name = "myLabel";
this.myLabel.Size = new System.Drawing.Size(**124, 17**);
this.myLabel.TabIndex = 1;
this.myLabel.Text = "A simple windows label.";
when I've not done anything other than open the file.
Does anyone know why this is happening? Has anyone else experienced anything like this?
Feature, not a bug. The form was originally designed on a machine that had its video adapter dots-per-inch setting at 96. Your machine has a different DPI, 120. Very easy to change on modern versions of Windows, you picked the 125% (Medium) setting in Control Panel + Display.
A different dpi setting affects the size of the fonts you use. There's one visible in your code snippet, it is 8.25 points. One point is 1/72 inch. So the text was originally 8.25 * 1/72 = 0.114583 inches high. With the dpi at 96, that's 0.114583 x 96 = 11 pixels. Note how this also explains why you got the extra 0.25 added to the point size, it made a nice round number.
But now your dpi is 120, the text will be 8.25 x 1/72 x 120 = 14 pixels. The text got bigger, your control needs to get bigger too or it will clip the text, shearing off the descenders.
This was done automatically when you loaded the form. The essential properties are AutoScaleMode, set to Font by default. And AutoScaleDimensions, you'll find it assigned at the top of the InitializeComponent() method. That's the one that remembered what the original DPI setting was.
This is going to happen on your user's machine as well. Do make sure that the form auto-scaled properly. You may have some trouble if you have controls that have a different font size. And just check the form back into source control so this rescaling doesn't happen again.
I'm using the report viewer control included in Visual Studio 2005 and something odd is happening; when I set the margins on the report and I run the application the report viewer adds a page break after each content page, so if I have 2 content pages I end up having 4 pages of which 2 of them are blank pages.
If I set the margins of the report as zero then the report displays ok but of course it doesn't look good without the margins (and won't print properly)
I'm pretty sure the content is not wrapping or something that could cause this since I intentionally designed the tables to fit in 6 inches so, 6 inches plus 2 (one for each side margin) are 8 and I still have half an inch of space there so things don't mess up since this is in letter size which is 8.5" x 11"
Anybody has had this same behavior?
Thanks in advance.
Found the solution, turns out that the body should not be wider than the report size so for example if you have a standard letter page: 8.5" x 11" than the body should be less than 8.5, pay special attention if you have margins since you have to subtract those inches too, I want a one inch margin per side so left and right would sum up two inches:
8.5 - 2 = 6.5
So if you plan to have a letter report with one inch margins make sure the body is 6.5 at the most then it would fit.
Pretty obvious huh? but I did not figured it out at the beginning since the report viewer designer does not have any rulers to mark the beginning of the body, only for the report.