Hi Roger,
is it possible add next optional parameter for Parent of created Alert's dialog?
Now, when some dialog window is moved in any side(to left or to right) or to second monitor(pc with two displays or notebook with attached next external monitor), Alert window is showed in the center of first monitor and not in or over wanted dialog window...
DC_GUIAlertColor( { GRA_CLR_WHITE, GRA_CLR_RED } )
nChoice := DC_GuiAlert( ... )
Also, there is something similar with DC_MsgBox - there is EVAL clause, where I can use DC_CenterObject(o,oMyDlgScr), but there is unwanted graphical side effect when is visible how object is moved.
Zdeno
Alert, MsgBox
-
- Posts: 147
- Joined: Thu Jan 28, 2010 9:24 am
- Location: Nitra, Slovakia
- Contact:
Re: Alert, MsgBox
Coming in build 255 (this week):
1151. Added new OWNER parameter to the DCMSGBOX command and DC_MsgBox()
function. If the owner parameter is not used, the message box will
center on the primary monitor, otherwise it will center on the owner.
1152. Added new BUTTSIZE and HORIZONTAL parameters to the DCMSGBOX command
and DC_MsgBox() function. BUTTSIZE <aButtSize> will set the size of
buttons that are created with the BUTTONS clause. HORIZONTAL will
place the buttons horizontally instead of vertically.
1151. Added new OWNER parameter to the DCMSGBOX command and DC_MsgBox()
function. If the owner parameter is not used, the message box will
center on the primary monitor, otherwise it will center on the owner.
1152. Added new BUTTSIZE and HORIZONTAL parameters to the DCMSGBOX command
and DC_MsgBox() function. BUTTSIZE <aButtSize> will set the size of
buttons that are created with the BUTTONS clause. HORIZONTAL will
place the buttons horizontally instead of vertically.
Code: Select all
#INCLUDE "dcdialog.CH"
FUNCTION Main()
LOCAL GetList[0], oDlg
@ 0,0 DCSAY 'This is a test of DCMSGBOX centering on its owner'
@ 20,0 DCPUSHBUTTON CAPTION 'Test It!' SIZE 20,2 ACTION {||TestIt(oDlg)}
DCREAD GUI TITLE 'Msgbox centering' PARENT @oDlg
RETURN nil
* --------------
FUNCTION TestIt( oOwner )
LOCAL lStatus, nChoice := 2
DCMSGBOX 'This is a test','of the','Message box','system' ;
BUTTONS {'Button1','Button2','Button3'} TO lStatus ;
CHOICE @nChoice ;
FONT '12.Helvetica Bold' ;
COLOR GRA_CLR_RED ;
BUTTSIZE 90,30 HORIZONTAL ;
OWNER oOwner
RETURN nil
PROC appsys ; return
The eXpress train is coming - and it has more cars.
Re: Alert, MsgBox
Roger,rdonnay wrote:Coming in build 255 (this week):
1151. Added new OWNER parameter to the DCMSGBOX command and DC_MsgBox()
function. If the owner parameter is not used, the message box will
center on the primary monitor, otherwise it will center on the owner.
i think you need to add a get/set to allow the default to center the box on the owner if desired..
That will save much recoding for many..
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Re: Alert, MsgBox
The owner will default as the SetAppWindow() object.
The eXpress train is coming - and it has more cars.
Re: Alert, MsgBox
If this is not the primary monitor, you need to make the change in the docs..rdonnay wrote:The owner will default as the SetAppWindow() object.
thanks..
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Re: Alert, MsgBox
I made the changes in the code and the docs.
The eXpress train is coming - and it has more cars.
-
- Posts: 147
- Joined: Thu Jan 28, 2010 9:24 am
- Location: Nitra, Slovakia
- Contact:
Re: Alert, MsgBox - build 255
Hi Roger,
first, thanks for adding new OWNER clause.
But there are few problems with DCMsgBox:
1. it looks like default behavior from previous builds was changed from centering of pushbuttons to alingment them to left... why? is it possible add any set/get function to set this default/wanted behavior? see 1a vs 2b or 4a vs 4b in attached image
2. in next code is missing parameter BUTTSIZE - docs says that size of buttons will depends on longest caption - and in this example both two buttons have 4 chars, so why it is so big ? and first is wrong painted too...
DCMSGBOX 'This is', 'a test', 'info', 'message' ;
BUTTONS { 'but1', 'but2' } ;
CHOICE @nChoice ;
FONT '8.Arial' ;
ICON XBPSTATIC_SYSICON_ICONQUESTION ;
HORIZONTAL
3. also, is it possible add color clause for whole dcstatic area and not only for text? something like I can set e.g. for DC_Alert() with DC_GUIAlertColor()
Now if I set COLOR for info text of DcMsgBox to e.g. White On Red, it looks not nice - more better will it looks on whole RED drawingarea of MsgBox dialog window
Zdeno
first, thanks for adding new OWNER clause.
But there are few problems with DCMsgBox:
1. it looks like default behavior from previous builds was changed from centering of pushbuttons to alingment them to left... why? is it possible add any set/get function to set this default/wanted behavior? see 1a vs 2b or 4a vs 4b in attached image
2. in next code is missing parameter BUTTSIZE - docs says that size of buttons will depends on longest caption - and in this example both two buttons have 4 chars, so why it is so big ? and first is wrong painted too...
DCMSGBOX 'This is', 'a test', 'info', 'message' ;
BUTTONS { 'but1', 'but2' } ;
CHOICE @nChoice ;
FONT '8.Arial' ;
ICON XBPSTATIC_SYSICON_ICONQUESTION ;
HORIZONTAL
3. also, is it possible add color clause for whole dcstatic area and not only for text? something like I can set e.g. for DC_Alert() with DC_GUIAlertColor()
Now if I set COLOR for info text of DcMsgBox to e.g. White On Red, it looks not nice - more better will it looks on whole RED drawingarea of MsgBox dialog window
Zdeno
- Attachments
-
- build255.PNG (49.83 KiB) Viewed 14229 times