I have a problem with the alignment of a few names (changed for this question).
with this code I display the names in a richtextbox where it should be in one row with the "Spalte:" after the Names...but it doesn't. Can anybody help me please?
(only the first for-loop is necessary for my question, the next one does another job)
I added a pic what it looks like and how it should be looking. I know I can do it like its in the commented area (doesn't work in every case), but I need to change the code for a few other things so this needs to work....
Here is what I have:
And here is what I want:
Thanks for helping me :D
You have four options:
Change the code for the RichTextBox to use a fixed-width font. Most fonts have variable widths for each character, meaning you can't line things up neatly based on spacing alone.
Use tabs instead of spaces for the layout (and make sure the tab size is large enough to account for variances in your text).
Use a grid control of some type (DataGrid, GridView, etc)
Use a custom control for each row with labels at specific places (and either calculate positions yourself to place them on the form or use something like a FlowLayoutPanel).
Related
I've picked up a project from a former colleague but know nothing about javascript and/or chart.js, I'm trying to learn.
I've been asked to part of the graph/legend - red ring in the image.
The thing is the chartjs json string/structure is split into separate variables which make it pretty hard to follow - and also give code samples. I've tried changing the "options" string, i.e. options: {legend: {display:false }}, but it's still displaying.
Is the part marked red actually part of the legend or is it something else on the chart
Image showing what I need to hide
That isn't the legend. Somewhere in the options there is a property xAxes. Here your collegue has defined multiple new axes. These are the ones you see. If you remove them and remove the xAxisId from the datasets you will get what you want
I have a question I'm using vs2015 and crystalreport CRforVS_13_0_18. I designed my report but when this report has a field longer than the others columns, only this grows, Even I set all the fields to check the option Can Grows. Can you help me?. Thanks in advance. I share a snapshot.
And this is my designer.
When I put borders, they don't show with the same height. like this:
I did the extra section but i have problems with left and right lines.
Finally. i got to do lines untill the end of the section but how can i align in vertical center? please.
Add another section below Section 3. Let's call this Section N.
Put a horizontal line (as long as table width in Section 3) in this Section N, and decrease the height of this
section to as low as possible.
Reduces it only leave space for this horizontal like to be visible.
Now when you will be run the report, section N will be printed for every section 3 (row) and can help in drawing a line after each row.
Please show the "Informe principal view" if you can, to get a more clear picture.
So the field in description for item nº2 and 3 should grow ?
Can you try this:
Did you check the field in sql ?
Are the labels (Nº, Cant, Cod.Barras ...) on different sections than the fields ?
Are the fields you wanna grow on Details ?
Did you set a printer ?
I have a problem with character spacing.
Basically I have something like this which comes from a txt file:
****************
*System Details*
****************
Looks nice and uniform, however, when I open have this go into a RichTextBox this happens:
Irregular character spacing example:
I've tried all different properties to try and stretch it, render it etc. but nothing works.
The data is coming in from code-behind OpenDialogBox that stores all the lines of the file in a string[]. A foreach loop then sends the lines into the RTB. (It needs to be a loop as each line gets checked)
Any help it greatly appreciated!
Many thanks
This is most likely a font choice problem. By default WPF uses Segoe UI on Windows 7 and above which is a non-monospaced font. This means that each character will not necessarily take up the same amount of space as each other character leading to issues if you are trying to align characters between lines. The easiest way to get alignment to work is by changing the font to a monospaced font by setting the FontFamily property on the RichTextBox.
i have "search TextBox" to search in treeview, i give result very well. But i want to get those parts get Bold which i typed in "search TextBox" of my winform.
Ex: i Typed Ram then it gives *Ram*esh .
The TreeNode class doesn't support that, its Text is always drawn with one font, the TreeView.Font. Making parts of the text bold is technically possible but very hard to get right. You need to enable custom drawing with the TreeView.DrawMode property and DrawItem event, there's a good example of it in the MSDN Library article.
That's the easy part, the hard problem is that the node is too small to fit the text after you draw parts of it in a bold font. TreeView is missing a "MeasureNodeText" event that would allow you to ask for enough space. The only workaround for that is to lie about the node text and make it artificially wider by prefixing characters. Which you then don't draw in the DrawItem event. Very hard to get consistently right, you'll want to consider a fixed pitch font instead.
I cannot recommend you pursue this unless the feature is really important to you. This otherwise explains why you never see this feature in other programs. Consider changing the color instead of the font weight too. Still hard to glue the pieces together btw.
There are many tables nested inside as it showd in the following three images.
Please give an idea so that I can see the circled images fully in the third image..
ps: if you want any html code of o a part, I can share it here on request..
Now
1
alt text http://img148.imageshack.us/img148/5750/21619773.jpg
2
alt text http://img408.imageshack.us/img408/2884/30078896.jpg
The Desired Html Page:
The Final Scene:
Having trouble understanding your question... if you're looking to enlarge a table, it might be as simple as setting the width. However, you'll get more of what I think you're looking for if you're usings divs and/or floats instead of tables... tables tend to make your layout very rigid and un-fluid.
If you're looking to move content to different areas on the page after the expand, this can be done in javascript by manipulating the DOM... I can't be more specific without understanding what you're trying to do.
Can you post a picture of what you want it to look like afterwards? The circles and arrows aren't giving me a clear understanding.