DCMSGBOX...BUTTONS request

This forum is for eXpress++ general support.
Post Reply
Message
Author
fbaker
Posts: 20
Joined: Sun Mar 14, 2010 11:07 am

DCMSGBOX...BUTTONS request

#1 Post by fbaker »

Hello Roger,

Before the next release, could you take a look at the following mod as a possibility.
It would help the look of these buttons if there could be a BUTTSIZE width, height clause
where the understanding would be that the buttons in the buttons array are on a single row
with at least one col space between them if they fit within the width of the implied width of the msg box.

Thank you.

Fred 331/252 at the moment.

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DCMSGBOX...BUTTONS request

#2 Post by rdonnay »

Trying to calculate all of this dynamically would require a major rewrite of the DC_MsgBox() function. It is old code and was never intended for this kind of complexity.

What I can do however, it modify the code to put the buttons in one row, with a fixed size if you pass a new BUTTSIZE parameter as an array (in pixels).
The eXpress train is coming - and it has more cars.

fbaker
Posts: 20
Joined: Sun Mar 14, 2010 11:07 am

Re: DCMSGBOX...BUTTONS request

#3 Post by fbaker »

Roger,

I think we're on the same page. I would be very satisfied with a single BUTTSIZE declaration to size all buttons on a single row. Perhaps the absence of the BUTTSIZE clause could mean revert to the current display of stacked buttons. I'm really just looking for a button that looks more like the regular DCPUSHBUTTON sizing result.

Thank you. Fred

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DCMSGBOX...BUTTONS request

#4 Post by rdonnay »

Here is a new _DCMSG.PRG and DCDIALOG.CH.

Copy _DCMSG.PRG to your \exp19\source\dclipx directory.
Copy DCDIALOG.CH to your \exp19\include directory.

Rebuild DCLIPX.DLL by running BUILD19.BAT or BUILD19_SL1.BAT.

There are new options to the DCMSGBOX command:

BUTTSIZE <nWidth>, <nHeight> [HORIZONTAL]

COLOR <nFgColor> [,<nBgColor>]

Example:

Code: Select all

#INCLUDE "dcdialog.CH"

FUNCTION Main()

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

wtf nChoice, lStatus pause

RETURN nil


PROC appsys ; return
Attachments
DCMSGBOX.zip
New DCMSGBOX options
(46.18 KiB) Downloaded 649 times
The eXpress train is coming - and it has more cars.

Post Reply