how can I enlarge the boundaries of an html table - c#

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.

Related

Is there an option in chart.js to hide values in the graph legend

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

C# string.Format alignment issue

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).

How to create a Simple tag cloud? Using C# and Styling with css

I'm finding it impossible to create a tag cloud, I can't find any walkthrough’s or tutorials. (ones that work at least).
I'm just looking for a simple, basic example of a working tag cloud and I can spice it up after that.
The best link i found is:
http://www.geekzilla.co.uk/View960C74AE-D01B-428E-BCF3-E57B85D5A308.htm
But it's out dated and I can't download the source file, and there are many gaps in the code.
This isn't a really hard problem. Essentially a tag cloud is just a way of linking the fontsize to the how common the tag is.
First thing is how often does the tag appear:
select Value, Count(*)
from Tag
group by Value
order by Count(*)
Then when you render this resultset to the page, have some sort of algorithm to take the count for each tag and represent it as a font size. A naive approach would be to set the fontsize directly to the count, but that's likely to lead to unreadable results. Instead, perhaps just have the top 10% as a large font, the next 10% as the next fontsize down, etc. You'll have to work out an exact algorithm that works for you and your data, though.
Also, tag clouds are really a bit rubbish from several points of view (readability, searching, accessibility). Make sure the tag cloud isn't the only way to get access to the tags. Perhaps in alpha order or by Count(*) on a dedicated page.
Use the TermCloud from the Google Charts API. It's very easy to use and it renders beautifully.

calculate html page breaks (html 2 pdf) server side for precise print layout with headers and footers

We print pdf books generated through a html to pdf application.
There is a header and footer on each page, and we place content exactly using production, and translation restrictions (and layout variations) for different languages to ensure that the fixed content for each page fits.
So for example, although our content is dynamic, a paragraph is expected to take approximatley the same amount of space for the same place in the book. We sometimes change style and layout attributes for translations but the same rules about like sizes apply.
We have a header and footer on each page, and the entire book is rendered as one long html page using css line breaking to force each header onto to a new page. So to reflect we control fixed content height per page server side.
This works well, and we are very happy with the advantages that HTML affords us in presentation (designers rather than programmers can design pages etc), we are also heavily invested in this tech, we are in too deep to change direction now, so we are not able to change our technology, we are using html 2 pdf and we need to make this work as best as possible. That is not to say we could not mix tech. but...
The problem is thus, we now have some variable sized content, that we have no former control over, to us it is text, so we have control over its formatting, but not it's quantity. We also have headings which are different sizes.
We need a way to calculate page breaks, leaving as little white space as possible, and I would love to know how anyone else is dealing with this. I know this will not be an exact science, but I still need the best approach possible.
We have total control over the rendering/layout engine it is always ie8 compatible, so different browsers need not be considered.
These are my thoughts, would love to hear yours:
This is our current method, assign a number of lines per page (variable by font-size and font to allow for different locales) each block of content will be calculated into n lines cost and this figure used to calculate pages breaks.
Pro simple
Con inaccurate, none of our fonts are monospaced, needs configuring for every locale.
Render each consecutive page of free flow content into a webpage in a div of the exact page width (fixed div) let it flow to whatever vertical height it requires, using a html 2 bmp solution capture an image and use the height of the rendered image (edge detected and cropped if required) to calculate the required number of pages.
Pro Could be accurate, not too expensive if free flow content is kept contiguous.
Con Incomplete solution, once I know the required number of pages, how do I know where to break the html? Measuring each page using this method and edge detecting would be very expensive.
On a font by font basis, knowing in advance the font sizes, padding and margins of text and headings, calculate width and line breaks and height, chracter by character using width data extracted from the font file.
Pro Once all the data had been extracted, and margins had been added for differences in HTML rendering this could likely be fairly accurate.
Con Highly intricate and sensitive to style sheet changes.
Could we use a WebBrowserControl to somehow measure the content?
Love to hear your thoughts and suggestions.
EDIT....
Our pdf converter is Winnovative, which runs within a .net Windows service, our html feed however is generated in PHP.
Kindly refer the manual
http://www.winnovative-software.com/manual%5CHTML%20to%20PDF%20Converter%20for%20.NET%20-%20Developer%27s%20Manual.htm
point 5.1.
Hope this solution helps you.
Note: the internal links are not working, so kindly manually navigate to the desired point.
This question is old, but I am doing the same basic thing as you. What I've found is that line number counting is still important, but you can use the css style line height to standardize the size of each line. (height for tr's if html is table based). This should allow you to have a constant number of lines per page.
Did you come up with a solution that worked for you?

Create a 5 star-rating control with hover images without JavaScript

Is there a way to implement a 5-star rating control, that supports changing the images of the 5 stars upon hover, without the use of Javascript? A click would need to perform a HTTP POST
To get a better understanding I searched for a sample and found http://orkans-tmp.22web.net/star_rating/ (Scroll to "Quick example with SELECT options")
As far as my knowledge of HTML goes, it is not possible to have multiple images / buttons that perform a Post (to know which rating was given by the user), and simultaneously change multiple background images.
Here is an example from CSS3 Secrets
jsfiddle
You can use css selectors to get what you want done without javascript.
You can change the image using CSS. Just apply a class and give it the :hover option.
i.e.
.star:hover
{
color:blue;
}
I assume that you would want all previous stars to change color as well on hover, this would be possible, but quite difficult. We'll start with an image of 5 starts (all highlighted) and an image of a single unhighlighted start. Place five of the unhighlighted starts right on top of each other (set the absolute postion). Adjust the intend of the stars so that each is indented more than the last and they are laid out properly (without actually overlapping each other). Add a CSS on hover that's different for each one. It will need to replace the image with the 5 stared highlighted image. The width will need to be set so that only the appropriate number of stars is shown. The z-index will need to be set so that it is on top of the unhighlighted images of all previous stars.
Is it possible 2 use the OnMouseOver and OnMouseOut option to create the same effect of a hover?

Categories

Resources