Page 1 of 2

dc_msgbox Caption Cutoff

Posted: Fri Oct 28, 2016 8:13 pm
by Cliff Wiernik
As shown in the attached image, as shown in Xdot, using this line of code

dc_msgbox(,,{'Not found'},'Warning')

the caption is cutoff. I think the checking routines for the size of the message box dialog should also make certain that it is wide enough to avoid chopping the caption off.
dc_msgbox.jpg
dc_msgbox.jpg (67.56 KiB) Viewed 13503 times

Re: dc_msgbox Caption Cutoff

Posted: Sat Oct 29, 2016 1:01 pm
by rdonnay
I have known about this problem for awhile but haven't yet found a solution because the width of the title bar can't be easily determined. I'll try to find time to fix this.

Re: dc_msgbox Caption Cutoff

Posted: Sun Oct 30, 2016 2:17 am
by Victorio
this can be temporary solution :
dc_msgbox(,,{padc('Not found',30," ")},'Warning')

Re: dc_msgbox Caption Cutoff

Posted: Sun Oct 30, 2016 7:24 am
by rdonnay
this can be temporary solution :
dc_msgbox(,,{padc('Not found',30," ")},'Warning')
You are right.
This is what I have suggested for several years.

Re: dc_msgbox Caption Cutoff

Posted: Sun Oct 30, 2016 3:17 pm
by Cliff Wiernik
I can handle that. I wrap a function into dc_msgbox anyways.

Cliff

Re: dc_msgbox Caption Cutoff

Posted: Mon Oct 31, 2016 1:04 am
by Tom
Besides, DC_MsgBox() does not reflect SCALEFACTOR if set with DC_GetOptDefault(), so it stays as the only dialog not scaled.

Re: dc_msgbox Caption Cutoff

Posted: Mon Oct 31, 2016 2:25 am
by Victorio
I found other problem with dc_msgbox in new release 264. In 260 was messages modify with DCSAY Pad(aMessage..., in new version 264 without Pad.
Old version centered messages in center , because I cannot allign it to left side .
But new version need set buttonsize, because I must modify every call this function.

Re: dc_msgbox Caption Cutoff

Posted: Mon Oct 31, 2016 5:31 am
by rdonnay
DC_MsgBox() does not reflect SCALEFACTOR if set with DC_GetOptDefault().
That is correct.
Are you saying that you want it to change with the SCALEFACTOR?

I would have to add a new Get-Set function to enable that capability.

Re: dc_msgbox Caption Cutoff

Posted: Mon Oct 31, 2016 5:33 am
by rdonnay
But new version need set buttonsize, because I must modify every call this function.
Give me a sample of how you are calling DCMSGBOX and how you are modifying the call.
I don't understand.

Re: dc_msgbox Caption Cutoff

Posted: Mon Oct 31, 2016 6:54 am
by Victorio
excuse me, I must prepare sample. here is only part from it.
I mean, in old version was buttons other size, than in 264, in 260 was centered in new was align to left and smaller. So, it can be my mistake, than have not set every important parameters.

FUNCTION asktlac

* pre pokusne tlacitko v nahlade
*pre pokus s toolbarom aj browser ak tu to nedám, potom preberá Getoptions z inej funkcie
Local GetList := {}
Local GetOptions, oToolbar2,oHladaj

* polia pre funkcie vyhľadania podľa kľúčov a code bloky
Local aHladkluce,aHladFunkcie

PARAMETERS ntspar,nazovsuboru,defvolba
PUBLIC ntsp

ntsp=padr(ntspar,12)

defvolba=defvolba
if defvolba<1 .or. defvolba>3
menuask=1
else
menuask=defvolba
endif

DCMSGBOX "Vytlačenie súboru : [ "+ntsp+" ]"+nazovsuboru ;
TITLE "Dialóg" ;
FONT fontnt ;
BUTTONS {"Na obrazovku a do súboru prn", ;
"Do súboru prn - blokované ", ;
"Na obrazovku a tlačiareň ", ;
"Na obrazovku a do súboru PDF" ;
} ;
CHOICE @menuask ;


fontnt is font name