FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Folder:AddItem new ::Dialogs Position
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Folder:AddItem new ::Dialogs Position
Posted: Sun Feb 12, 2023 06:11 AM
hi,

when using AddItem of TFolder() / TFolderEx() the new ::Dialogs have different Position as 0,0 :?:

it disappear when "resize" ::Dialogs

is there a Workaround without "resize" :?:
greeting,

Jimmy
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Folder:AddItem new ::Dialogs Position
Posted: Mon Feb 13, 2023 08:20 AM
Dear Jimmy,

When Method AddItem() is called, the new dialog gets created at zero, zero:
Code (fw): Select all Collapse
   if Empty( cResName )
      DEFINE DIALOG oDlg OF Self STYLE WS_CHILD ;
         FROM 0, 0 TO oThis:nHeight - oThis:nFdHeight - 5, oThis:nWidth - 6 PIXEL
   else
      DEFINE DIALOG oDlg OF Self STYLE WS_CHILD ;
         FROM 0, 0 TO oThis:nHeight - oThis:nFdHeight - 5, oThis:nWidth - 6 PIXEL ;
         NAME cResName
   endif
then, from the ACTIVATE DIALOG we set the position:
Code (fw): Select all Collapse
   ACTIVATE DIALOG oDlg NOWAIT ;
      ON INIT ( oDlg:Move( oThis:nFdHeight + 2, 3, oThis:nWidth - 6, oThis:nHeight - oThis:nFdHeight - 5 ) ) ;
      VALID .f.
So if you modify DATA nFdHeight you could change its position automatically
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: Folder:AddItem new ::Dialogs Position
Posted: Tue Feb 14, 2023 04:24 AM
hi Antonio,
Antonio Linares wrote:So if you modify DATA nFdHeight you could change its position automatically
ok, thx for Answer
greeting,

Jimmy

Continue the discussion