Folder:AddItem new ::Dialogs Position

Post Reply
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Folder:AddItem new ::Dialogs Position

Post by Jimmy »

hi,

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

is there a Workaround without "resize" :?:
greeting,
Jimmy
User avatar
Antonio Linares
Site Admin
Posts: 42512
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Re: Folder:AddItem new ::Dialogs Position

Post by Antonio Linares »

Dear Jimmy,

When Method AddItem() is called, the new dialog gets created at zero, zero:

Code: Select all | Expand

   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: Select all | Expand

   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
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: Folder:AddItem new ::Dialogs Position

Post by Jimmy »

hi Antonio,
Antonio Linares wrote:So if you modify DATA nFdHeight you could change its position automatically
ok, thx for Answer
greeting,
Jimmy
Post Reply