Search results
Search results 61-70 of 70.
Dear visitor, welcome to Jabaco - Community.
If this is your first visit here, please read the Help. It explains in detail how this page works.
To use all features of this page, you should consider registering.
Please use the registration form, to register here or read more information about the registration process.
If you are already registered, please login here.
Hi everybody, I've created a word processor that saves (and loads of course) RTF Files. Notice that in the folder Res, theres another folder res. Copy the files to the first Res folder I created on windows vista so the menu bar might be a little bad. Credits: LoadFile And Savefile, I got some help from A1880 and OlimilO. Enjoy it Download(from my site) Thanks, klctal
Hi A1880, This time, I succeeded. But it only saves a open document. But thanks. Your source was helpful. klctal
Hi A1880, There still is a bug on my computer! The box at the down right corner (in red) says this: Listening for transport dt_shmem at address: Jabaco33119813x165 Exception in thread "AWT-EventQueue-1" java.lang.InstantiationError: javax.swing.text.EditorKit at Form1.SaveRTF(Form1.jsrc:220) at Form1.Command1_Click(Form1.jsrc:22) at Form1$CommandButton._Click(Form1.jsrc:285) at VB.CommandButton.actionPerformed(CommandButton.jsrc:96) at javax.swing.AbstractButton.fireActionPerformed(Unknown Sourc...
Hi A1880, I have tried your source code but there was some bugs. I changed it into this: Source code 1 2 3 4 5 6 7 8 9 10 Public Sub SaveRTF(RTB As RichTextBox, RTFFileName As String) Dim fos As New FileOutputStream fos=New FileOutPutStream(RTFFileName) Dim Doc As Document Doc=RTB.Parent.getDocument Dim kit As EditorKit kit = RTB.Parent.getEditorKit Call kit.Write(fos, Doc, 0,0) fos.close End Sub Now there was no bugs but it only would show the common dialog(as I added) a lot of times. I think i...
hi OlimilO, I would just do RichTextBox1.SaveFile(RTFFileName) But there isn't a SaveFile in the jabaco's RichTextBox. Thanks, klctal
Hi everyone, I was thinking about saving RTF Files. But what is wrong? Source code 1 2 3 4 5 6 7 8 9 Public Sub SaveRTF(RTB As RichTextBox,RTFFile As String) Dim Fil As New FileOutputStream Dim Doc As New DefaultStyledDocument(New StyleContext) Dim Kit As New RTFEditorKit Fil=New FileOutputStream(RTFFile) RTB.Parent.setEditorKit(Kit) RTB.Parent.setDocument(Doc) Kit.Write(Fil,Doc,0,0) End Sub It just saves a blank RTF text document. It wipes the text in the rich text box Thanks, klctal
Hi OlimilO and A1880, The source code was great!! Both of them worked! Thanks, klctal
Hi A1880, Thanks a lot! Your source helped me out a lot. But when I typed if in and ran started debuging, Jabaco said the DefaultStyledDocument class was not found. Is there a solution to this problem? Thanks, klctal
Hi OlimilO, Thanks for your time. In VB, I would just use RichTextBox1.LoadFile("C:\Text1.rtf") or Open CommonDialog1.FileName For Input As #1 Do Until EOF(1) Line Input #1, lineoftext$ alltext$ = alltext$ & lineoftext$ RichTextBox1.Text = alltext$ Loop Close #1 Thanks, klctal
Hi everyone, Could somebody tell me how to read a multi lined document? Thanks, klctal