FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 25
→
Wx - Trabalhando com arquivo .RTF (Texto Formatado)
Wx - Trabalhando com arquivo .RTF (Texto Formatado)
Débuté par adrianoboller, 20 oct. 2015 14:57 - 1 réponse
Connectez-vous…
adrianoboller
#1
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 20 octobre 2015 - 14:57
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
______________________________________________
Signaler
0
0
adrianoboller
#2
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 20 octobre 2015 - 15:05
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
______________________________________________
Signaler
0
0
→ Revenir à WINDEV 25
WINDEV 25
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte