help for save a say aspect

help for save a say aspect

Postby Silvio.Falconi » Thu Sep 26, 2013 8:11 am

I wish to save the caption of say, the color, and the font to a file ini
first problem when I change the caption it not refresh
Some one can help me please



Code: Select all  Expand view

#include "FiveWin.ch"


Static cImpresa, oFont[4] ,oSay[1]

Function Test()
   Local oDlg
cImpresa:="<<Impresa>>"

 DEFINE DIALOG oDlg  SIZE 680,520 ;
                    TITLE "Test"

 ACTIVATE DIALOG oDlg;
      ON INIT Placecontrol(oDlg)
Return NIL


function Placecontrol(oWnd)

 DEFINE FONT oFont[1] NAME "Arial" SIZE 0,-24  // iMPRESA

@ 3, 2 SAY oSay[1] PROMPT cImpresa    OF  oWnd  DESIGN SIZE 250, 24      TRANSPARENT    FONT oFont[1]
     oSay[1]:bRClicked = { | nRow, nCol | LabelInspect(oSay[1], nRow, nCol,"IMPRESA" ) }
     oSay[1]:SetFocus()
Return NIL


 function LabelInspect( oCtrl, nRow, nCol, cSection)
   local oMenu
   MENU oMenu POPUP
      MENUITEM "&Colori" ACTION oCtrl:SelColor()
      MENUITEM "&Fonts"   ACTION oCtrl:SelFont()
      MENUITEM "&caption" ACTION (oCtrl:Settext( GET_TEST()),oCtrl:GetText(),oCtrl:refresh())
   ENDMENU

   ACTIVATE MENU oMenu AT nRow, nCol OF oCtrl
   RETURN NIL


    FUNCTION GET_TEST()
            LOcal cName :=space(30)
            Local ctext

      MsgGet( "Please type your text",;          // Title
              "Your text:",;                     // Label
              @cName )

               return  ctext
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: help for save a say aspect

Postby MaxP » Thu Sep 26, 2013 9:16 am

You can try these changes

Code: Select all  Expand view

    #include "FiveWin.ch"


    Static cImpresa, oFont[4] ,oSay[1]

    Function Test()
       Local oDlg
    cImpresa:="<<Impresa>>"

     DEFINE DIALOG oDlg  SIZE 680,520 ;
                        TITLE "Test"

     ACTIVATE DIALOG oDlg;
          ON INIT Placecontrol(oDlg)
    Return NIL


    function Placecontrol(oWnd)

     DEFINE FONT oFont[1] NAME "Arial" SIZE 0,-24  // iMPRESA

    @ 3, 2 SAY oSay[1] PROMPT cImpresa    OF  oWnd  DESIGN SIZE 250, 24      TRANSPARENT    FONT oFont[1]

         oSay[1]:bRClicked = { | nRow, nCol | LabelInspect(oSay[1], nRow, nCol,"IMPRESA", @cImpresa ) }
         oSay[1]:SetFocus()
    Return NIL


     function LabelInspect( oCtrl, nRow, nCol, cSection, cImpresa)
       local oMenu
       MENU oMenu POPUP
          MENUITEM "&Colori" ACTION (oCtrl:nClrText:=ChooseColor( oCtrl:nClrText ),oCtrl:refresh())
          MENUITEM "&Fonts"   ACTION oCtrl:SelFont()
          MENUITEM "&caption" ACTION (cImpresa:=GET_TEST(),oCtrl:Refresh())
       ENDMENU

       ACTIVATE MENU oMenu AT nRow, nCol OF oCtrl
       RETURN NIL


        FUNCTION GET_TEST()
                LOcal cName :=space(30)
                Local ctext

          MsgGet( "Please type your text",;          // Title
                  "Your text:",;                     // Label
                  @cName )

                   return  cName
 


Saluti
Massimo
User avatar
MaxP
 
Posts: 85
Joined: Thu Jul 12, 2007 2:02 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 90 guests