What kind of txtfield to use? - textfield

I am making an PM system, now I am to where you are going to type the PM.
I dont know really what to use, I don't want to use an normal fugly text field, as theres much nicer stuff out there.
Ive seen those auto expand textfields, that expands more you write? What is this called? Then there's this facebook have, which i also like. And then i have seen this "CKEdtior" stuff, which also seems pretty cool (but i wonder how the output from the CKeditor look like if you use bold, italic, etc..)
Which should I get? What i wish is nice, simple & effective.

maybe this is what you are looking for!

Depends on if you want to allow the user to put in stylized text like bold, italic, links etc. If thats the case there are many editors out there that will turn a stock text area into a full featured editor or even a limited editor. All the below editor return formatted HTML text. What you do with it is up to your app.
Try these if you want a word like editor:
xinha.webfactional.com
tinymce.moxiecode.com
ckeditor.com
www.dhtmlx.com/docs/products/dhtmlxEditor/index.shtml

Related

iTextSharp reverses Arabic text when filling combed text field

I have a problem with iTextSharp which looks like it could be a bug.
I have a combed text field and when using iTextSharp to add Arabic text to it, the Arabic letters initially appear reversed when the field is "highlighted". So 'ف ا د ي' appears 'ي د ا ف'.
The moment I click on the field, the highlight disappears and the text appears in the correct direction.
This happens regardless of the direction and alignment and only happens in combed text fields.
Can anyone offer any solutions to this?
Note: I've added the iText tag as well because I have a hunch that this issue is not specific to iTextSharp only and I hope I can replicate any workarounds or solutions in iTextSharp. Regards,
You can usually fix this by setting GenerateAppearances to false on the form object.
Annotations in a PDF (which form fields are a version of) can have different "states" and for each of these "states" you can specify how you want a renderer to display that state. For instance, a checkbox can either be "checked" or "not checked" which is given, but how to render that actual checkmark isn't. Maybe an "X", maybe a ✓, maybe a ☑ or maybe something totally different. These different states are called their Appearance State.
If you don't set an appearance state for an annotation then you are effectively surrendering control of that state to the PDF renderer and letting it do whatever it wants.
Adobe's renderers (Acrobat and Reader) are the de facto standard for PDF renderers and recent ones are actually really good at "filling in the blanks", especially when it comes to things like RTL and many non-English/Latin things. Other renderers out there, including Google's, Apple's, Microsoft's and even your printer might not be as good at this, however, so you might want to test this.

Programatically extract content of PowerPoint slides into MS Word-like format?

I'd like to extract all of the information (formatted text, images, etc) from powerpoint slides into a flowing, readable (MS Word-style) format.
I'm not interested in keeping the slide concept at all--think of taking class slides from a college course and batch converting them all into one collective study guide.
I can't find a way to do this within powerpoint (though if you know of one, please share!) and,
I don't have experience scripting Office apps. Is this kind of thing easily done? Does this kind of script already exist somewhere?
Clarification:
In an earlier version of this post, I used the word "flowing" to refer to a slide-free (MS Word-like) format. This does not, however, refer to the actual formatting of slide content. So keeping bullet lists, etc. is fine and even desirable.
I don't see this being a simple task. College professors use a format of either "TITLE: BULLET POINTS OR IMAGE" or "EVERY WORD I'M ABOUT TO SAY" for their slides in my experience, and you're just not going to get flowing, readable text from the former no matter what you do. For the latter, you've already got your text, you just have to copy it to another document.
I think you might as well just open the PowerPoint, select all the text, and copy+paste into Word/Publisher/InDesign/your favorite page layout program. You'll have the same effect and the same amount of editing after the fact except without all the hassle of writing a program to do it for you.
Doing a Print operation to a PDF with the N-up options might be a good solution for handouts if that's all you need. You could expand the idea and condense ALL the slide decks into one, get it printed (with N slides per page and the note space next to it) and bound, and voila, instant study guide. I've seen that, and then you get options for note taking.
More power to you if you're doing this just because you can - don't let me stop you. There is much good learning to be had that way. You might want to look into writing a program using the Microsoft.Office.Interop namespace in .NET (starting at http://msdn.microsoft.com/en-us/library/bb772069.aspx ), or perhaps look on CPAN ( http://search.cpan.org/search?mode=all&query=powerpoint ) and do it with Perl! There are lots of ways to do it, but you've got to be up for the challenge.
Text is fairly simple to extract, but what text do you want? The text from the title and body text placeholders only? File, Save As, and choose to save the outline.
The other text on the slide? That can be pulled out to a text file programmatically, but in what order? Suppose you have a complex diagram with text callouts. Extracting the text is going to give you gibberish. There's no obvious/meaningful order to the text other than what the human viewer supplies by noting that "Ah. The arrow next to this bit of text points to the fribulator sub-assembly, so must relate to it in some way." Try doing that in code. ;-)
You could give the author a way to sort the text into reading order so that the code knows what order to extract it in, but that would require a fair amount of work on the part of the author.
If you can be certain that all of the content is in title+bullet form, no worries. Otherwise, you'd have to be able to articulate exactly what you want extracted, in what form and in what order before you could get anywhere with this.
MS Word-style is not only readable, but writeable as well (which was not specified in your requirements). If you want a read-only guide, PDF is your natural choice (either through Acrobat Distiller or LibreOffice). Combine individual Acrobatted presentations with PDFtk, or Acrobat or Foxit and you're good to go without any programming at all.
"Is this kind of thing easily done?" - Yes, your humble servant did a couple of similar scripts ages ago (extracting enhanced metafiles from Powerpoint slides).
"Does this kind of script already exist somewhere?" - Yes. Probably at hundreds of places, but not sure if any of them get posted to the 'Net. All things considered think you'd be better off learning some scripting and macro programming on your own, since a ready-made script may be not quite fit for your needs - and to understand and rewrite it you'd need more time than to code & debug from scratch.
Since you mention that title+bullet form is ok, open the file, choose to save as and pick Outline as the save-as type.
I think you could parse through the PowerPoint file for formatting, text and pictures. There are Visual Studio namespaces available for such a task. You open the file, parse through it and make Word file from these. Complicated work, as you would have to consider type of elements and their position, you would have to use a temporary structure for each slide.
Have a look at this sample code :
http://msdn.microsoft.com/en-us/library/office/gg278331.aspx
How to: Get All the Text in All Slides in a Presentation
Basically, using c# and openXML SDK 2.0, it loops through all the slides in the presentation, and then adds each text in every slide into a string builder. You can write out the result into a text file if you like (modification required).
Recommendation: <25 oct 2012>
For your study guide, maybe you could extract all the text in each slide, and dump those text programmatically (by adding that function into the sample code above while it's iterating the slides) into the "Notes" section of each slide. With that, you can print it in Notes Page view. You'll get the entire slide image at the top half of the page, and the actual slide texts at the bottom of it in the Notes Page view. It sure beats trying to copy and paste all the text from the slide into the notes section. You can even print it 2 slides per page, as small text would not be an issue inside the slide's image, and diagrams would still be visible more or less.
Unfortunatly, this method works for simple standard slide format ... meaning, it's OK if your slides just have a title, and a center text box with all the bullet points... any complex slide layout (maybe text boxes scattered everywhere) will come out in non-order and will be confusing. But at least you can still look at the slide image above to make sense of it :)

How can I implement a text parsing/tokenising interface similar to the way Xcode highlights class names?

I am very new to Cocoa and Objective C so please forgive me if this is a dumb or obvious question. I'd be very grateful just for pointers to the right classes to read the documentation for or any existing web resources that will help me figure this out. I am very much willing to do the hard work figuring this out if I can find some suitable resources to point me in the right direction.
I am writing an app that, essentially, will contain a text view into which a user will enter multi-line text. This will then be parsed (I'm thinking of using an NSScanner or, maybe, the ready-made stuff in ParseKit) to extract and tokenise certain words and numerical information which will be stored in a model object.
I think I can figure out the parsing and data-storage stuff. However, I would like the tokenised words and numbers to be highlighted to the user so that they can easily see them, change them and also have a contextual menu (with a disclosure triangle) to perform actions such as ignoring them. Ideally this would look a lot like the way Xcode deals with class names (underlining them with dashed line, giving them a menu etc).
I've had a look at NSTokenField but this seems to be suited most to single-line fields and the big blue tokens are a bit too visually disruptive for what I want. Also, the docs seem to suggest that using the plain text style only allows one token per field so I couldn't mix that with another style to get the effect that I'm after.
I've also had a look at text attachment attributes but I can't quite conceptualise whether they would be the right way to go. So, my questions are:
What is the best way to tokenise only some text within a multi-line text view?
Is it possible to implement a custom visual style for the tokens? Can I do this with existing classes or do I need to create my own?
Watch the WWDC sessions on the Cocoa text system. The class you want to understand is NSLayoutManager.

Understanding RTF and edit it with vb.net

I have this RichTextbox in my vb.net form and I would like to when a user click a button, for example to embold the selected text, how would I do this.
Also, I do NOT want to use the standard vb.net expressions such as RichTextBox1.SelectedText.Font.Bold = True. I want to do something like RichTextbox1.SelectedRTF="[bold]" & RichTextBox1.SelectedRTF & "[/bold]" or whatever RTF looks like.
Can I just add the RTF options random places or can a RichTextBox return an error if the text is in wrong format. I'm mostly looking for info on how to work with RTF without using the standard vb expressions. Thank you very much for any help provided
It just doesn't work this way, it is not an HTML editor. Hacking RTF directly is technically possible through the Rtf property but very hard to get right. RTF is not exactly a friendly format. Start reading here, try not to panic at the quality of that first page. Well, go ahead.

Creating a More Attractive DataGridView

My form looks like this with a DataGridView:
I would like to make it look more professional. Can someone recommend a "makeover" for it? Perhaps there is a more attractive way to display this data.
I have been using a free grid control from Component Factory, it has all the same features as the standard DataGridView. The grid allows customization for pretty much all UI elements.
This looks quite nice already. What you might want to do is set the Dock to Fill with the Properties panel to make it fill the whole form.
Personally, I'd recommend softening those colors a bit. Use pastel-versions of the same color perhaps.
Also, like person-b suggests: Dock->Fill.
I'm not a big fan of unnecessary row/record-selector columns. If you don't need it, I'd recommend getting rid of it.
One last thing, Normally I'd recommend not paining your UI with a crayon, instead letting the colors default to whatever the user has specified as their Windows theme. However, I see the point of coloring the columns in your case. I would suggest that you allow the user to modify the colors. I'm not color-blind, but it's possible your colors may be unreadable to someone who is.
My first thoughts are on the column colors, does the color mean something, if you are try to differentiate to columns I would use two subtle colors. Large color shifts should have a meaning (Errors are bold and Red). The Font should use the System font styles and basic colors should also you the system colors. Colors and font styles may work for you but not everyone, some people are color blind, some people need larger fonts.