Jump to content
Fivewin Brasil

Gravar Detalhamento de Proposta com Formatção


marcioe

Recommended Posts

Olá a Todos os amigos, 
Temos um Cliente que Faz Caldeiras, e na proposta comercial (orçamento) ele tem que fazer uma descrição do equipamento, ou seja um breve relato etc..

porem o cliente quer que seja armazenado esse texto, até TRANQUILO, porem preciso que seja armazenado com formatação Tipo Word
Negrito, etc..

Teria como fazer isso no Five 
Meu banco de dados é MYSQL

Link to comment
Share on other sites

Já tentou com RICHEDIT. Acho que dá pra salvar em BLOB (Memo) ?

#include "Richedit.ch"
FUNCTION TESTRICH()
   local oDlg, oRich
   local hRichDLL
   local lSyntaxHL := .f.

   hOldRes := GetResources()
   hRichDLL := LoadLibrary( "riched20.dll" )

   DEFINE DIALOG oDlg NAME "Test"
   oRich = TRichEdit():Redefine( 100, { || "" }, oDlg )
   oRich:lHighLight = .f.
   oRich:lreadonly := .t.

   REDEFINE BUTTON ID 110 ;
      ACTION oRich:SetText( MemoRead( "TestRich.prg" ) )

   REDEFINE CHECKBOX lSyntaxHL ID 115 OF oDlg ;
      ON CHANGE ( oRich:lHighLight := lSyntaxHL,;
                  oRich:SetText( oRich:GetText() ) )

   REDEFINE BUTTON ID 120 ;
      ACTION oRich:LoadFromRTFFile( cGetFile( "RTF file (*.rtf) | *.rtf" ) )

   REDEFINE BUTTON ID 130 ;
      ACTION oRich:SaveToRTFFile( cGetFile( "RTF file (*.rtf) | *.rtf",;
                                  "Please write a filename", "test" ) )

   REDEFINE BUTTON ID 998 ACTION ( oRich:GoToLine( 10 ), oRich:SetFocus() )

   ACTIVATE DIALOG oDlg CENTERED ON INIT SetResources(hRichDLL)
   FreeLibrary( hRichDLL )
   SetResources(hOldRes)

RETURN NIL

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...