How to create style sheet for creating html preview - c++

I am developing a visual c++ Win-API application and I want to create a style sheet to display the html contents(I am not sure that i need to create style sheet only may be some thing else.But want to know what else can be used instead ?). Any idea how to achieve that??.Is it the same procedure as is the case with XML style sheet creation ?? (in xml file case we create a style sheet in order to preview on preview-pane)
If not please give idea how to do that ? As in case of html file we also have to take in account the font colour/background colour/font sizes etc. How to do that ?
(Actually i have to create preview handler for .html file) I have done every thing i just need to create style sheet (If not style sheet then some thing like this which will help me to display the html contents) and i already have data of .html file in a stream (which is IStreal * FinalHTMLStream)I just need to find the mechanism (like cretaing style sheet or may be any other)to create the html preview on preview pane using this stream.
Any Idea how to accomplish this ?

There are certain frameworks that allow you to create an HTML control easily, Win32++ is one of them. Give it a try.

Related

How to remove text shadow on JSX tags

I want to remove this shadow:
So that it looks like a regular HTML:
How do I do that?
Normally (in HTML/XML file) that would be Tag style. And XML styles may be taking over HTML here (as an underlying language in IDE's styling hierarchy perhaps).
I'm not sure if this will work here but try this anyway (can be used in other scenarios):
Select some code (e.g. a whole tag) in such a file.
Invoke Help | Find Action... (or Search Everywhere and focus on "Actions" tab)
Locate Jump to Colors and Fonts entry there and invoke it.
See if a popup will have the related style listed (does not seem to list it here in PhpStorm using HTML+PHP file in my quick test -- only lists PHP styles).
P.S. It's not a "text shadow" but a background color.

Listing customization ServiceNow

How can I personalize a list within ServiceNow?
I mean, I have this list:
But I think its very confusing to see the position on the right side.. How can I center it?
Like CSS customization or JS or something like that.. where can I find the customization form?
You can customise the position of the field content by using Field Styles.
If you mean customising the position of the field header, I have had a play around with doing this and I seem to have got it working.
If you inspect the HTML of the column header you want to target (the th tag), you'll see that there's an attribute on it called glide_type which contains in it the type of column. You can use this to create a CSS rule to target only headers of a particular type.
For example, I have a field of type decimal, and the th tag has the following attribute:glide_type="decimal". So to target that element, I could create a CSS rule like the below:
th.text-align-left.list_header_cell[glide_type="decimal"] {
text-align: right;
}
The hacky part is including that CSS so that it applies throughout the SN interface. You can use a UI Script to run some JavaScript which includes the Style Sheet. So if you put the above CSS inside a new Style Sheet (navigate to Content Management > Design > Style Sheets), and copy that new Style Sheet's Sys ID, you can create a UI Script with the below in it to include that Style Sheet on all pages:
link = document.createElement("link");
link.href = "STYLE_SHEET_SYS_ID_GOES_HERE.cssdbx?";
link.type = "text/css";
link.rel = "stylesheet";
link.media = "screen,print";
document.getElementsByTagName("head")[0].appendChild(link);
After doing that, you'll see that the Style Sheet is getting loaded on all pages, and if you've written your CSS right then you should find that the column header is now right-aligned!
As #Kirk said, performing this kind of customisation will mean that it's hard for ServiceNow Customer Support to assist if there's something you've customised getting in the way of their troubleshooting. Take this into account if you decide to implement something like this, and also thoroughly test this on a non-production instance.
In addition to the above, this solution may break in future releases as ServiceNow may decide to change the way that lists work and thus the CSS selector may no longer target the right/any element.
Hope this helps!
Dylan
It's not suggested to customize any sort of CSS or JS with that, we were told that is voids your support for that section if you do so.
You could just add a few more display fields if you really desire to remove the extra white-space.
For a complete description of that (which you may know how to do):
Click the Gear icon
Then select some relevant fields from the Available section, and click the Right arrow to add them.

Setting default font size for graphs in Powerpoint

I've found no other stackexchange site to ask this question so I present it here. If there's a more appropriate place for it please let me know.
I have just been given a ms-powerpoint template document to fix. It was created by designers using the slide master editor in MS-Office 2011 for Mac. The problem is that when the customer creates a new slide using one of these templates and then wants to insert a chart into one of the designated boxes (which is only one of the things that can be stuck in there) the text in the chart is always set at 18pt. I've looked everywhere for a setting that sets the default font size for charts (and smart art) for only that document but have been unable to find it.
Any pointers or help of any kind would be more than great.
I received the following answer from James Gordon from a Microsoft forum:
Charts are handled by Excel. In Excel you can create Chart Template,
which are saved in (.crtx) file format and will appear in the Ribbon.
The way to do it is to customize a chart and then right-click on the
chart. Use the Save As Template option from the pop-up menu. If you
save your template in the Chart Templates folder (the default when the
save dialog opens), after you quit and then re-open Excel, the
template will be available to you in the Ribbon.
SmartArt is within your PowerPoint presentation. There are various
approaches you might take regarding SmartArt. As you pointed out,
SmartArt can be specified in a Slide Master, or on Slide Design.
Saving a presentation as a Theme (.thmx) is one option. Another save
option is to save as a Template, which is more comprehensive (includes
every aspect of a slide show).

How to add a hyperlink column in an UltraWebgrid that will redirect me to a popup window

I am pretty new to Infragistics controls and finding it hard to add a hyperlink column to the ultraweb grid. Can anyone help me out with this.
Currently, I am binding the data coming from the Database to the grid.
To this data I need to add a hyperlink column "View" that will redirect me to a popup.
I need to pass some values from this page to the popup.
Need pointers if this can be done on Javascript.
I am unable to get the code anywhere.
It would be really helpful if someone can help me out
Regards,
Sunitha
If you know HTML it is actually pretty simple to do. On the Initialize RowLayout method of the UltraGrid and reference the cell you want the hyperlink to go into and within the text property place the link there using HTML and include parameters within the HTML to pass to the popup.
If you are using a fairly recent version of Infragistics, they have a Modal Popup window that you can use which is fairly easy to integrate and use, and with this you do not need a javascript popup. You can use the ClientSideEvent BeforeSelectChangeHandler to open the Modal popup and pass values into there by referring to other cells within the row.

XSL TreeView Define whether the xsl div is open/closed

I'v done a tree view in xsl using a javascript function
I want to change the icons depending on the status (+ for to open , - for to close)
This questions is as clear as thick molasses in a pool of mud. (Will try to answer, though.)
I assume you mean XML stylesheets with xsl. If you meant Excel, it should have been xls. But let's assume you mean stylesheets and you're using it to generate a webpage which contains a treeview. In this treeview there are icons indicating if the node is expanded or not. If expanded, display +, else display -. Am I right, here?
Now, it depends on how you've implemented this treeview in your stylesheet. The most practical way would be to just send the tree data fully expanded to the page and let the Javascript handle this client-side. In that case, all you need to know is how to expand and collapse nodes in Javascript with the additional icon change.
Another possible implementation would be when expanding and collapsing is done serverside, thus you'd only send the visible data. In that case you can also just tell the page which icon to use and there would be no need for any javascript. The icon would just be a link back to the server, updating the data through a new requests which builds a new webpage.
A third option would be the WEB 2.0 solution, where you just send the list as a collapsed treeview and every time the user clicks an icon, a AJAX event gets triggered, collecing the additional node data and changing the icon of the treenode.
These are three very different techniques and they're not always the best solution. The first solution is a problem when dealing with lots of data in your tree. It needs to load it all. The second option will generate a lot more traffic with the server but handles better with large amounts of data because you only display the open node. The third option is a bit of a mixture between the first two options. You don't need all data from the beginning and you're not recreating the webpage over and over again. But it's also more complex to code.
Now, I wonder which of these options you use. Once we know this, we can help you. (Edit your question to provide this information and perhaps even add the JavaScript tag to it.)
To be honest, xsl is only used to change the shape of an XML document and it knows nothing about treeviews or whatever. So I don't see any link between xsl and treeviews. It's just that you use xsl to transform your data into something that some Javascript library can process as a treeview. Which Javascript library is this?