I wish set a dialog at x,y but I not found the position of the msgitem og Msgbar
oApp:oMsgItem1:bAction := { |oBtn| ::ConteggioTotali(oApp:oWndMain:oMsgBar) }
Function ConteggioTotali(obtn)
Local aPoint := AdjustWnd( oBtn, -27*2, 15*2 )
DEFINE DIALOG oDlgConteggio size 400,250 TRANSPARENT;
TITLE "Conteggio elementi"
ACTIVATE DIALOG oDlgConteggio CENTERED;
ON CLICK oDlgConteggio:End() ;
ON PAINT oDlgConteggio:Move(aPoint[1]-100, aPoint[2],,,.t.);
give me allway under the main window
set a dialog on a position
- Silvio.Falconi
- Posts: 7170
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 5 times
set a dialog on a position
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 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
I use : FiveWin for Harbour March-April 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
- nageswaragunupudi
- Posts: 10729
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 10 times
- Contact:
Re: set a dialog on a position
Try this sample and adapt the logic to your program
Code: Select all | Expand
#include "fivewin.ch"
//----------------------------------------------------------------------------//
function Main()
local oWnd, oBar, oMsgBar, oMsgItemDlg, oMsgItemPop
DEFINE WINDOW oWnd
DEFINE BUTTONBAR OF oWnd 2007
DEFINE MSGBAR oMsgBar OF oWnd 2007
DEFINE MSGITEM oMsgItemDlg PROMPT "ShowDialog" OF oMsgBar SIZE 100 ;
ACTION ShowDlg( oMsgItemDlg )
DEFINE MSGITEM oMsgItemPop PROMPT "Show Popup" OF oMsgBar SIZE 100 ;
ACTION ShowPopup( oMsgItemPop )
DEFINE MSGITEM PROMPT "Dummy Item" OF oMsgBar SIZE 100
DEFINE MSGITEM PROMPT "Dummy Item" OF oMsgBar SIZE 100
oWnd:nHeight := 500
oWnd:nWidth := 700
ACTIVATE WINDOW oWnd CENTERED
return nil
//----------------------------------------------------------------------------//
static function ShowPopup( oMsgItem )
local oPop
MENU oPop POPUP 2007
MENUITEM "One"
MENUITEM "Two"
MENUITEM "Three"
ENDMENU
ACTIVATE MENU oPop AT oMsgItem:oMsgBar:nTop, oMsgItem:nLeft OF oMsgItem:oMsgBar:oWnd FLAGS 0x20
return nil
//----------------------------------------------------------------------------//
static function ShowDlg( oMsgItem )
local oDlg
local oMsgBar := oMsgItem:oMsgBar
local oWnd := oMsgBar:oWnd
local aPt := { oMsgBar:nTop, oMsgItem:nLeft }
aPt := ClientToScreen( oWnd:hWnd, aPt )
DEFINE DIALOG oDlg SIZE 100,150 PIXEL TRUEPIXEL
ACTIVATE DIALOG oDlg ON INIT oDlg:Move( aPt[ 1 ] - oDlg:nHeight, aPt[ 2 ] )
return nil
//----------------------------------------------------------------------------//
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- nageswaragunupudi
- Posts: 10729
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 10 times
- Contact:
Re: set a dialog on a position
Try this sample and adapt the logic to your program
Code: Select all | Expand
#include "fivewin.ch"
//----------------------------------------------------------------------------//
function Main()
local oWnd, oBar, oMsgBar, oMsgItemDlg, oMsgItemPop
DEFINE WINDOW oWnd
DEFINE BUTTONBAR OF oWnd 2007
DEFINE MSGBAR oMsgBar OF oWnd 2007
DEFINE MSGITEM oMsgItemDlg PROMPT "ShowDialog" OF oMsgBar SIZE 100 ;
ACTION ShowDlg( oMsgItemDlg )
DEFINE MSGITEM oMsgItemPop PROMPT "Show Popup" OF oMsgBar SIZE 100 ;
ACTION ShowPopup( oMsgItemPop )
DEFINE MSGITEM PROMPT "Dummy Item" OF oMsgBar SIZE 100
DEFINE MSGITEM PROMPT "Dummy Item" OF oMsgBar SIZE 100
oWnd:nHeight := 500
oWnd:nWidth := 700
ACTIVATE WINDOW oWnd CENTERED
return nil
//----------------------------------------------------------------------------//
static function ShowPopup( oMsgItem )
local oPop
MENU oPop POPUP 2007
MENUITEM "One"
MENUITEM "Two"
MENUITEM "Three"
ENDMENU
ACTIVATE MENU oPop AT oMsgItem:oMsgBar:nTop, oMsgItem:nLeft OF oMsgItem:oMsgBar:oWnd FLAGS 0x20
return nil
//----------------------------------------------------------------------------//
static function ShowDlg( oMsgItem )
local oDlg
local oMsgBar := oMsgItem:oMsgBar
local oWnd := oMsgBar:oWnd
local aPt := { oMsgBar:nTop, oMsgItem:nLeft }
aPt := ClientToScreen( oWnd:hWnd, aPt )
DEFINE DIALOG oDlg SIZE 100,150 PIXEL TRUEPIXEL
ACTIVATE DIALOG oDlg ON INIT oDlg:Move( aPt[ 1 ] - oDlg:nHeight, aPt[ 2 ] )
return nil
//----------------------------------------------------------------------------//
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Silvio.Falconi
- Posts: 7170
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 5 times
Re: set a dialog on a position
that's just what I was looking for. thank's my friend
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 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
I use : FiveWin for Harbour March-April 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