Page 1 of 1

Scaling the window content when you expand it

Posted: Mon Jul 02, 2018 11:50 pm
by Eugene Lutsenko
Sometimes, when I maximize a window to the full screen, its contents also expand and scale, and sometimes it does not occur. How to make sure that when you expand the window to full screen, its contents also unfold, and do not appear an empty background as in the image below.

Code: Select all


@ 0,0 DCSAY {|| MessIPC } OBJECT oSay1 SAYSIZE 133 FONT "9.HelvBold"   // Наименование инф.портрета

/* ----- Create browse Classes ----- */

@ 1, 0 DCBROWSE oBrowse ALIAS 'Classes' SIZE 48.8,27  ;
       PRESENTATION aPres                             ;
       COLOR {||IIF(2*INT(Classes->Kod_cls/2)==Classes->Kod_cls,nil,{nil,GraMakeRGBColor({230,252,213})})}          // Вывод строки цветом RGB

DCBROWSECOL FIELD Classes->Kod_cls  HEADER L("Код"                ) PARENT oBrowse WIDTH 5
DCBROWSECOL FIELD Classes->Name_cls HEADER L("Наименование класса") PARENT oBrowse WIDTH 23
DCBROWSECOL FIELD Classes->Int_inf  HEADER L("Редукция класса"    ) PARENT oBrowse WIDTH 3
DCBROWSECOL FIELD Classes->Abs      HEADER L("N объектов (абс.)"  ) PARENT oBrowse WIDTH 3
DCBROWSECOL FIELD Classes->Perc_fiz HEADER L("N объектов (%)"     ) PARENT oBrowse WIDTH 3

/* ----- Create browse InfPortCls ----- */

PRIVATE bColorBlockZn:={|| iif(InfPortCls->Znach>0,{GRA_CLR_RED,nil},iif(InfPortCls->Znach=0,{GRA_CLR_BLACK,nil},{GRA_CLR_BLUE,nil})) }  // Клиффорд

@ 1,51 DCBROWSE oBrowIpc ALIAS 'InfPortCls' SIZE 82,27 ;
       PRESENTATION aPres                                       ;

DCSETPARENT oBrowIpc
   DCBROWSECOL FIELD InfPortCls->KOD_atr  HEADER L('Код'                  ) WIDTH 5 ;
               COLOR {||IIF(AT('SPECTRINTERV:',InfPortCls->NAME_atr)=0,nil,{nil,GraMakeRGBColor({VAL(SUBSTR(InfPortCls->NAME_atr, AT('{', InfPortCls->NAME_atr)+1, AT('{', InfPortCls->NAME_atr)+ 3-AT('{', InfPortCls->NAME_atr)+1+1)),VAL(SUBSTR(InfPortCls->NAME_atr, AT('{', InfPortCls->NAME_atr)+5, AT('{', InfPortCls->NAME_atr)+ 7-AT('{', InfPortCls->NAME_atr)+5+1)),VAL(SUBSTR(InfPortCls->NAME_atr, AT('{', InfPortCls->NAME_atr)+9, AT('{', InfPortCls->NAME_atr)+11-AT('{', InfPortCls->NAME_atr)+9+1))})})}       // Вывод поля цветом RGB
   DCBROWSECOL FIELD InfPortCls->NAME_atr HEADER L('Наименование признака') WIDTH 37
   DCBROWSECOL DATA {|x|x:=InfPortCls->Znach,IIF(Empty(x),'',Str(x,8,3))} HEADER L("Значимость") FONT "9.Courier" COLOR bColorBlockZn

DCGETOPTIONS TABSTOP

DCREAD GUI ;
   OPTIONS GetOptions ;
   MODAL ;
   TITLE L('4.2.1. Информационные портреты классов');
   FIT ;
   CLEAREVENTS
[/size]

Re: Scaling the window content when you expand it

Posted: Tue Jul 03, 2018 7:44 am
by rdonnay
DCGETOPTIONS TABSTOP ;
RESIZE RESIZEDEFAULT DCGUI_RESIZE_AUTORESIZE

Re: Scaling the window content when you expand it

Posted: Tue Jul 03, 2018 10:46 am
by Eugene Lutsenko
Thank you very much, it worked! I don't know many things, such as simple and effective things

Re: Scaling the window content when you expand it

Posted: Wed Jul 04, 2018 12:30 pm
by digitsoft
Hello
the dccombobox, DCGROUP and DCSTATUSBAR does not work using SCALEFACTOR aScale;
RESIZE;
RESIZEDEFAULT DCGUI_RESIZE_AUTORESIZE;