|
Are you using <code> before or after the <pre> tag? It will make a difference.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
The code tag is inside the pre tag.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi Paul,
the problem with your examples is they show result, not source.
Anyway, I did my little experiment and I observed:
PRE gives non-proportional font, pink background, and preservation of spaces and tabs
CODE gives non-proportional font, red foreground (hardly noticable), and when copying several
lines then newlines are lost.
for both: the optional "lang=cs" does not do anything.
My conclusion:
- I will continue to use PRE without CODE for blocks of code, (so one can copy them easily)
- I will occasionally use CODE without PRE inside a text alinea to quote a piece of
code that fits on a single line (so the newline-not-copied problem isnt relevant).
Does this match your view on things ?
Regards
|
|
|
|
|
This whole thing is strange. I just did <code><pre> and it shows orange background with black text, which is what I think Guffa was talking about; then doing <pre><code> yields orange background with red text.
Luc Pattyn wrote: Does this match your view on things ?
I see your point, and good case you've made with when to use <pre> and <code>.
I think the "lang=cs" is for articles, not 100% sure. as far as new lines go, I haven't seen anything go awry. I tried FF, IE, and Safari and can't really draw a conclusion on my configuration
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Paul Conrad wrote: I think the "lang=cs" is for articles, not 100% sure
Yes, I got it from the article manual, but decided to give it a try anyway. Would look
great on discussion forum too...
OK, I am taking this opportunity to add some more test cases:
public void nihil(int a) {
if (a!=0) throw new Exception("Not zero");
}
public void pre(int a) {
if (a!=0) throw new Exception("Not zero");
}
<br />
public void code(int a) {<br />
if (a!=0) throw new Exception("Not zero");<br />
}<br />
public void precode(int a) {
if (a!=0) throw new Exception("Not zero");
}
public void codepre(int a) {
if (a!=0) throw new Exception("Not zero");
}
|
|
|
|
|
Same stuff with "ignore HTML tags":
<blockquote class="FQ"><div class="FQA">Paul Conrad wrote:</div>I think the "lang=cs" is for articles, not 100% sure</blockquote>
Yes, I got it from the article manual, but decided to give it a try anyway. Would look
great on discussion forum too...
OK, I am taking this opportunity to add some more test cases:
public void nihil(int a) {
if (a!=0) throw new Exception("Not zero");
}
<pre>
public void pre(int a) {
if (a!=0) throw new Exception("Not zero");
}
</pre>
<code>
public void code(int a) {
if (a!=0) throw new Exception("Not zero");
}
</code>
<pre><code>
public void precode(int a) {
if (a!=0) throw new Exception("Not zero");
}
</code></pre>
<code><pre>
public void codepre(int a) {
if (a!=0) throw new Exception("Not zero");
}
</pre></code>
Luc Pattyn
try { [Search CP Articles] [Search CP Forums] [Forum Guidelines] [My Articles] }
catch { [Google] }
|
|
|
|
|
See my post I posted at the same time about the CPSyntax. On my laptop anything you have inside the code tags are showing up white/light blue alternating lines. Anything in just the pre tag by itself is showing up with light blue background/red text...
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Paul Conrad wrote: I just did
and it shows orange background with black text, which is what I think Guffa was talking about
Nope.
---
single minded; short sighted; long gone;
|
|
|
|
|
What do you get? I think Luc and I are trying to figure it out right now. We have have to ask Chris
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
If you ask Chris for some clarification and improvements, I'll second that.
Possible improvements:
support copy-with-newlines after code tag;
syntax coloring;
ignore all tags inside pre or code tag (so < and > remain intact inside code).
BTW: on IE6 (the only one I use) I dont see any difference between pre-code and code-pre.
Regards
|
|
|
|
|
Luc Pattyn wrote: IE6
Hmmm, I have IE7, haven't used IE6 since IE7 came out.
The ideas you've mentioned for improvement could work
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Paul Conrad wrote: I have IE7, haven't used IE6 since IE7 came out
I am happy with my current set of security holes. Dont need new features/creatures.
|
|
|
|
|
Luc Pattyn wrote: I am happy with my current set of security holes. Dont need new features/creatures.
I've got too much on this machine, nothing terrible or evil, just loads of different 30 day trial tools that need dumping. Might be time for some housecleaning
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Just fired up my laptop which has the CPSyntax Greasemonkey script and it shows alternating lines of white/light blue in the code.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
I am developing a screen saver in C#. However, I am stuck at one point. How can I embed resources in the src that will be build ? and any information how the standard screen savers store the resources ?
Thanks.
Please note images are to loaded at run-time which I want to embed in the src file, that the application will create.
-- modified at 7:57 Sunday 22nd July, 2007
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg."
- Bjarne Stroustrup
|
|
|
|
|
Hi,
there are several good articles on screensavers available on CodeProject.
you can include resources (images, icons, ...) in your exe by:
- adding their file to your project (I typically add a "resources" folder in the Solution Explorer pane)
- setting its "Build Action" to "Embedded Resource"
- adding some code to access the resource; I cant remember what exactly, so I let Visual
Designer use my resource (e.g. as an image for a picturebox, an icon for the main form),
then look at the code it generated, and copy/paste/modify that
I see no reason why screensavers would handle resources any different than other apps do.
|
|
|
|
|
Thanks for your response.
I am adding the images at run-time.Any help on this. I have got to know about ResourceWriter which creates a satellite dll. What I need is a single scr file, which has the resources embedded.
So any help on making the resource embedded in an exe at run-time ? Do I need to compile another exe(scr) at run-time and embed those images in the new exe(scr)?
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg."
- Bjarne Stroustrup
|
|
|
|
|
Hi,
I explained on how to embed images and the like into the exe at build-time; that would
result in a single file.
You did not ask about run-time images at first; if the images are only available at run-time,
why would you want to turn them into a dll, rather than just use them from where they are ?
I have no experience with ResourceWriter; I think it helps creating a resource dll
while said dll file is NOT in use. I expect, once a resource (or other) dll is in use,
you cant modify it.
|
|
|
|
|
Hello,
Thanks for the response.
Yes I know you were talking about embedding resources at build-time. That is why I asked for run-time.
The reason for this, if the user removes the images at the path or user wants to redistribute the screen saver. Then user would need to relocate the images as well. So in short I want everything in a single exe(scr) file.
Yes, resourcewriter creates a satellite dll. This has better results as compared to loading images at run-time.That is, the actions of user deleting the images does not affect the screen saver. However, relocating the screen saver on another machine would still require to move this dll as well.
Thanks.
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg."
- Bjarne Stroustrup
|
|
|
|
|
|
Hi,
Have you tried creating a gridview with 2 lines in one(1) record? I have 15 field that needs to fit the gridview which is my Detail info of my header/detail page. It display the entire fields but you have to scroll to the right in order for you to see the information.
Any work around?
Thanks
Dabsukol
|
|
|
|
|
I would use Repeater control...
Regards,
Arun Kumar.A
|
|
|
|
|
Sorry I forgot to tell you that the gridview that I am using should handle the edit/delete and can insert new row. all these is working already in my gridview though the display is my only problem. The design will not fit those users who is still using the 15inch monitor and our user doesn't want to accept scrolling to the right to see the other information.
Dabsukol
|
|
|
|
|
No Idea of how to do this with GridView...
But I think DataList control will fulfill all your need...
Regards,
Arun Kumar.A
|
|
|
|
|
Hello everyone,
When using property assembly: AssemblyKeyFile in Visual Studio 2005, I find that it is not supported and we need to using Project --> Properties --> Signing Tab to specify the sign key. Is that correct?
thanks in advance,
George
|
|
|
|