Move a text

Move a text

Postby Silvio.Falconi » Wed Oct 28, 2020 12:10 pm

How I can make to move a text ) say ?

I wish move a say when I change a combobox



test sample

Code: Select all  Expand view

#include "constant.ch"


Function test()
       local oDlg,oFont,oBold
       local nBottom   := 22
       local nRight    := 102
       local nWidth :=  Max( nRight * DLG_CHARPIX_W, 180 )
       local nHeight := nBottom * DLG_CHARPIX_H
       local oCbx
       local nVar:= 2
       local aType:={"UP","Down"}
       local oSay[10]
       local nRow:= 80
     
      DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
      DEFINE FONT oBold NAME "TAHOMA" SIZE 0,-14 BOLD
     
   DEFINE DIALOG oDlg        ;
   TITLE "Riga modulo"     ;
   SIZE nWidth, nHeight   PIXEL  FONT oFont    ;
   STYLE nOr( DS_MODALFRAME, WS_POPUP, WS_CAPTION,  4 ) ;
   COLOR CLR_BLACK,  nRgb( 245,244,234)
     
     
      @ 10,10 COMBOBOX oCbx VAR nVar Items aType Size 50,40 PIXEL of oDlg ;
           on CHANGE ( IIF( nVar=1,  (oSay[1]:Hide(),msginfo(),nRow-=12,oSay[1]:show(),oSay[1]:refresh()),;
                                     (oSay[1]:Hide(),msginfo(),nRow+=12,oSay[1]:show(),oSay[1]:refresh()) ) )


      @ nRow,10 SAY oSay[1] Prompt "position"+str(nRow) Size 80,12 PIXEL of oDlg UPDATE  TRANSPARENT

 ACTIVATE DIALOG oDlg CENTERED

RETURN NIL

 

even if the value of nRow changes the say is always in the same position
How is it possible ????
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: 7053
Joined: Thu Oct 18, 2012 7:17 pm

Re: Move a text

Postby ukoenig » Wed Oct 28, 2020 1:12 pm

Silvio,

just try :

@ 10,10 COMBOBOX oCbx VAR nVar Items aType Size 50,40 PIXEL of oDlg ;
on CHANGE ( IIF( nVar=1, nRow-=12, nRow+=12 ), ;
oSay[1]:Move( nRow ) , oSay[1]:refresh() )

Image

best regards
Uwe :D
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 86 guests