silverlight datagrid styling - mystery line atop first row - silverlight-5.0

Trying to get rid of the line that appears on top of the first row of data. I've changed about everything I can see in the DataGridStyle, DataGridHeaderStyle and DataGridRowStyle templates. I've changed colors of various elements in case the color used to draw that line was borrowed from other grid attributes (like SeparaterBrush e.g.). Still it remains. Any ideas?
I don't have enough rep points to post images, but here is a link to photobucket...
http://i810.photobucket.com/albums/zz23/kpgraci/grid_zps5353246d.jpg

In the DataGrid style template there is a rectangle named 'ColumnHeadersAndRowsSeparator'. This is responsible for the thin gray line below the column header and above the first row. Note that even is HeadersVisibility='None' this line still displays.
Changing this rectangle's Fill from #FFC9CACA to Transparent in the DataGrid template removes the line.

Related

Highlight external element on ChartJS hover

I want to be able to generate a chart and when parts of the chart are hovered (i.e. the point on a line graph), I want corresponding elements to have a class added to it on hover. Presumably by passing an array of elements to the hovered data point.
Is this possible in ChartJS? If not, can you recommend a chart software that is capable of this?
I achieved what I wanted with this answer:
https://stackoverflow.com/a/26258671/874691.
Here is my prototype: http://srgunltd.co.uk/chart.html

How do I draw a line on a Lazarus form?

I often use a TPanel or TGroupBox to group my form controls.
Now I need to draw just a straight line like the border of a Panel or GroupBox.
How do I do this on LAZARUS?
Thanks in advance!
Note: The technique must work on both Linux and Windows
As an optical line separator you should use either the TBevel component with Shape property set to one of the following values bsTopLine, bsBottomLine, bsLeftLine or bsRightLine depending on which line you currently need and resize it to a smaller size (in your case you can use bsTopLine or bsBottomLine and resize the bevel vertically):
Or you can use a special component called TDividerBevel which except the single line adds to this optical divider also a caption:
Here's what I've finally done but I'm not sure if this is the RIGHT way so I won't accept my answer. If there's someone else who can point out any issues with this, please let me know. I found this pretty straightforward as well :)
Place a TGroupBox on the form.
Leave the Caption property blank. Now it should look like a panel with only borders.
Use the mouse and drag the bottom border towards the top. Now it looks like a line.
Well, I personally think this method is NOT efficient as it would take up more memory space than just a real straight line. Anyway, so far it seems to work for me :)
Here's the screenshot - look towards the bottom (just above the last text box). The only issues is that on the sides of the line, it shows the lines bending. I think I should set the properties correctly than dragging with the mouse.

It is possible to hide part of labels google chart

I want to hide couple labels, first 2 and last 2 in axis X.
I want to disable black line at the bottom of the graph.
I'm able to do it after the chart is loaded - using javascript and change it dynamically. When I add new data and use draw method, Graph is overwriting my dynamic stylesheets changes. I was trying to set it as an option in graph initializer but I couldn't find the solution for that.
I use areaChart.
It was 3 years ago. I don't need it anymore. I'm leaving this question for others.
It's a little hard understanding what you're trying to do, but I think I get it.
As I read it, you want to eliminate two variables from your DataTable when you plot your chart (to prevent them from being in the legend)? Assuming that's the case, you can either take them out of the data table, or use a ChartWrapper on your object, and set the view:{columns:[x,y,z]} option to the ChartWrapper. Assuming you can't change the DataTable, or a ChartWrapper isn't an option, and you just want to not have certain plotted objects appear in your chart but not in the legend, you want to set the series option. For example, assuming three columns in your DataTable, you can hide the third item as:
series: [{visibleInLegend:true}, {visibleInLegend:true}, {visibleInLegend:false}],
Second of all, if you want to hide the horizontal axis, you need to have continuous data, and set hAxis.baselineColor to 'clear'.
To hide some of the tick-mark labels, use ticks: ticklist to label the axis, and for some of the labels in ticklist use an {v:value,f:label} structure definition, with a zero-length string for the label.
Here's an example. Note the omitted labels for some of the ticks on each vertical axis. View source to see how I did it:
http://www.sealevel.info/co2_and_ch4c.html
Note the tick list definitions. This one is for the left vertical axis:
var vticklist1 = [{v:235,f:''},{v:250,f:''},275,300,325,350,375,400,{v:425,f:'ppmv'}];
The first & second ticks (at the bottom, for values 235 and 250) display no labels. The next six ticks, for values 275-400, display normally. The last (top) tick displays as "ppmv" instead of 425. The result looks like this:

Avoid truncation of Labels in a ListView

folks!
I use a listview (Icon mode) to display items which consist of an image and a label.
As you can see in the shots the row height is variable on y depending on the label length. The problem is that I want the complete labels to be drawn, but they are automatically shrinked into two lines:
The strange thing about it is that once you select an item the whole label will be shown:
This is also the case when deselecting the item, but when another item gets selected, only that one will be shown completely.
Is there a way (without drawing the text manually) to avoid truncation in my case?
If some code is needed to answer this question, don't hesitate to ask.
Greetings,
Satara
I'm guessing this was a design choice: make things look less cluttered. E.g. picture your desktop with all labels shown completely... will look messy in my case.
However, you can fix this by drawing the label yourself. Have a look into custom draw which is a service provided by the list control. The thing is that it's usually an all or nothing approach, so this will likely require you to draw everything yourself: border, image, label, etc. The other option is to get hacky: subclass the window and draw the labels again after Windows did in response to several messages (unfortunately Windows does not restrict the painting to WM_PAINT, an optimization that is a left-over from the old days...)

How to display grid lines in a flex 4 list?

I am newbie with Flex 4 (and Flex/AS in general).
I am using a spark list control to display certain items with my custom Item Renderer.
I am trying to achieve the following:
(1) show a separating line between rows in my list control
(2) even when not a single row has been added, I want a horizontal grid lines to be displayed in the background
I am not sure whether (1) and (2) can be achieved in one go.
I can solve (1) by modifying my item renderer to have a border, I guess. But I want to know whether there is a better or more conventional way.
I am not sure how to address (2).
Thanks!
I would do it like you said , drawing a line at the bottom of the item renderer.
As for (2), you could add a line directly on a custom list skin and remove it when the dataprovider is set