I saw that in FiveDBU, but that does not happen in this example.
Please look at the RC control I entered. Is that the correct current value for the control ?
I know the RTF capability is working because it does engage the spell checker. But, it does not show the button bar.
Here is the full code for the Dialog. Please note that this has a "forced load" temporarily for testing purposes.
FUNCTION setup3
聽 聽 // Text Editor for disclosures
聽 聽 //聽 Updated:聽 聽 7/30/2015 5:55:48 PM
聽 聽
聽 聽 LOCAL oEndText, oDlg, nRcrd, oRich
聽 聽 PRIVATE cText := " ", cTitle := " ", cRtf := " "
聽 聽
聽 聽 // Open the text database
聽 聽 oEndText := tEndText():New( )
聽 聽 oEndText:gobottom( )
聽 聽 nRcrd := oEndText:recno( )
聽 聽 DO WHILE nRcrd < 8
聽 聽 聽 聽 oEndText:append( )
聽 聽 聽 聽 oEndText:skip( )
聽 聽 聽 聽 nRcrd := oEndText:recno( )
聽 聽 ENDDO
聽 聽 oEndText:gotop( )
聽 cText := oEndText:tagtext
聽 聽 // Create the dialog
聽 聽 DEFINE DIALOG oDlg RESOURCE "SETUP3" BRUSH oBrush transparent OF oWnd
聽 聽 oDlg:nHelpID := 6
聽 聽 REDEFINE BUTTONBAR oBarS3 ID 100 SIZE 60,60 OF oDlg 2015
聽 聽 聽 聽 聽 聽 oBarS3:bClrGrad := aPubGrad
聽 聽 MENU oWPopS1 POPUP
聽 聽 聽 聽
聽 聽 MENUITEM "Estimate" ACTION ( oEndText:goto(1), cText := oEndText:tagtext, cTitle := oEndText:texttype, ;
聽 聽 聽 聽 oDlg:update() ) MESSAGE "Text to print on estimates"
聽 聽 聽
聽聽 聽聽 聽 MENUITEM "Invoices" ACTION ( oEndText:goto(2), cText := oEndText:tagtext, cTitle := oEndText:texttype, ;
聽聽 聽聽 聽 聽 聽 oDlg:update() )聽MESSAGE "Text to print on invoices"
聽 聽
聽 聽 聽 聽 MENUITEM "Tag lines" ACTION ( oEndText:goto(3), cText := oEndText:tagtext, cTitle := oEndText:texttype, ;
聽 聽 聽 聽 聽 聽 oDlg:update() ) MESSAGE "Ad tag lines to printed on invoices"
聽 聽 聽 聽 MENUITEM "Counter" ACTION ( oEndText:goto(4), cText := oEndText:tagtext, cTitle := oEndText:texttype, ;
聽 聽 聽 聽 聽 聽 oDlg:update() )聽MESSAGE "Text to print on counter sales"
聽 聽 聽 聽 MENUITEM "Worksheets" 聽 ACTION ( oEndText:goto(5), cText := oEndText:tagtext, cTitle := oEndText:texttype, ;
聽 聽 聽 聽 聽 聽 oDlg:update() )聽MESSAGE "Text to print on worksheets"
聽 聽 聽 MENUITEM "Statements" ACTION ( oEndText:goto(6), cText := oEndText:tagtext, cTitle := oEndText:texttype, ;
聽 聽 聽 聽 oDlg:update() )聽MESSAGE "Text to print on statements"
聽 聽 聽 聽 MENUITEM "Recommendation" 聽 ACTION ( oEndText:goto(7), cText := oEndText:tagtext, cTitle := oEndText:texttype, ;
聽 聽 聽 聽 聽 聽 oDlg:update() )聽MESSAGE "Disclosure for recommendation"
聽 聽 聽 聽 MENUITEM "Text Message" 聽 聽 ACTION ( oEndText:goto(8), cText := oEndText:tagtext, cTitle := oEndText:texttype, ;
聽 聽 聽 聽 聽 聽 oDlg:update() )聽MESSAGE "Signature line for text messages"
聽 聽 聽 聽
聽 聽 ENDMENU
聽 聽 DEFINE BUTTON oWBtn1 OF oBarS3 RESOURCE "FIBILD" PROMPT "Sections" ;
聽 聽 聽 聽 ACTION 聽oWBtn1:ShowPopup() MENU oWPopS1聽TOOLTIP "Text sections" 聽
聽 聽 聽 聽 聽 聽
聽 聽 DEFINE BUTTON oWBtn3 OF oBarS3 RESOURCE "HRSAVE" ;
聽 聽 聽 聽 ACTION ( oEndText:tagtext := cText, oEndText:save( ), oDlg:update( ) )
聽 聽 DEFINE BUTTON oWBtn4 OF oBarS3 RESOURCE "SPELL" ;
聽 聽 聽 聽 ACTION 聽( cText := SpellOne( cText), oDlg:update() )
聽 聽 DEFINE BUTTON oWBtn5 OF oBarS3 RESOURCE "HREXIT" ;
聽 聽 聽 聽 ACTION oDlg:end()
/*聽 聽 聽
聽 聽 // Create edit control
聽 聽 REDEFINE GET cText MEMO ID 2155 OF oDlg ;
聽 聽 聽 聽 MESSAGE "Edit the text, and press OK to save your changes" UPDATE
*/
聽 聽 // Create edit control
聽 聽 REDEFINE RICHEDIT5 oRich VAR cText ID 2155 OF oDlg ;
聽 聽 聽 聽 MESSAGE "Edit the text, and press OK to save your changes" 聽//UPDATE
聽 聽 聽 聽
聽 聽 oRich:SetText( cText )聽
聽 聽 ACTIVATE DIALOG oDlg ON INIT (oReBar:hide( ), 聽oBarS3:lTransparent := .F.) CENTERED
聽 oReBar:show( )
聽 聽 // Close the file
聽 聽 oEndText:close()
聽 聽
RETURN NIL
And the .rc for this dialog:
SETUP3 DIALOG 0, 0, 660, 410
STYLE WS_POPUP | WS_CAPTION
CAPTION "Text Editor"
{
聽 聽 CONTROL聽聽 聽 聽 聽 聽 聽 聽 聽 "", 100, "TBar", 0|WS_CHILD|WS_VISIBLE, 0,0, 640, 30
聽 聽 CONTROL 聽 聽 聽 聽 "", 2155, "RichEdit50W", 4100 | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL, 10, 40, 500, 350
}
Built with FWH 21.11, Harbour 32 bit, Microsoft Visual Studio Community 2022