PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV 25
→
Wx - Trabalhando com arquivo .RTF (Texto Formatado)
Wx - Trabalhando com arquivo .RTF (Texto Formatado)
Started by adrianoboller, Oct., 20 2015 2:57 PM - 1 reply
Connect yourself…
adrianoboller
#1
Registered member
3,659 messages
Popularité : +175 (223 votes)
Posted on October, 20 2015 - 2:57 PM
Botão SALVAR:
//Anotacoes do Usuario - SALVAR
s is
string
=
RTFToText
(
EDT_
Anotacoes
)
IF
s
<
>
""
THEN
RtfSalvar
(
)
ELSE
Info
(
"Não foi digitado nada para ser salvo."
)
END
Ao abrir a Janela
Procedure
RtfAbrir
(
)
//RTF
PathFile_RTF is
string
=
fCurrentDir
(
fCurrentDrive
(
)
) +
"\Anotacoes_"
+
Usuario
+
".RTF"
EDT_
Anotacoes
..
RichEdit
=
True
EDT_
Anotacoes
..
Visible
=
True
// Open the selected document
IF
RTFLoad
(
EDT_
Anotacoes
,
PathFile_RTF
) =
False
THEN
RETURN
END
// Initialize the global variable with the name of the opened document
gfsDocumentName
=
PathFile_RTF
// Position the cursor at the beginning of the edit control
EDT_
Anotacoes
..
Cursor
=
1
IF
TextHeight
(
EDT_
Anotacoes
,
EDT_
Anotacoes
) >
EDT_
Anotacoes
..
Height
THEN
// Display the vertical scrollbar
ScrollBarShow
(
EDT_
Anotacoes
,
sbVert
)
ELSE
// Remove the scrollbar
ScrollBarShow
(
EDT_
Anotacoes
,
sbVert
,
False
)
END
Procedure Salvar
Procedure
RtfSalvar
(
)
//RTF
PathFile_RTF is
string
=
fCurrentDir
(
fCurrentDrive
(
)
) +
"\Anotacoes_"
+
Usuario
+
".RTF"
EDT_
Anotacoes
..
RichEdit
=
True
EDT_
Anotacoes
..
Visible
=
True
// Procedure used to write data to a text file
// IN: sDocumentName: Name of the document
n
FileID
is
int
=
0
// Open the file
n
FileID
=
fOpen
(
PathFile_RTF
,
foCreate
+
foWrite
)
// Save the document
fWrite
(
n
FileID
,
EDT_
Anotacoes
,
Length
(
EDT_
Anotacoes
)
)
// Initialize the global variables
PathFile_RTF
=
ExtractString
(
PathFile_RTF
,
1
, “
-
”
)
// Close the document
fClose
(
n
FileID
)
--
Adriano Jose Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 9949 1800
adrianoboller@gmail.com
skype: adrianoboller
______________________________________________
Report
0
0
adrianoboller
#2
Registered member
3,659 messages
Popularité : +175 (223 votes)
Posted on October, 20 2015 - 3:05 PM
Resultado Final:
Defina na Propriedado do Edtit que a barra de ferramentas estará sempre visivel e para isso coloque: [FORMATTING TOOLBAR = ALWAYS VISIBLE]
--
Adriano Jose Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 9949 1800
adrianoboller@gmail.com
skype: adrianoboller
______________________________________________
Report
0
0
→ Go back to WINDEV 25
WINDEV 25
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text