How to clean scroll-bar in DCBROWSECOL?

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

How to clean scroll-bar in DCBROWSECOL?

#1 Post by Eugene Lutsenko »

How to clean scroll-bar in DCBROWSECOL?

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

Re: How to clean scroll-bar in DCBROWSECOL?

#2 Post by rdonnay »

@ .. DCBROWSE .. NOHSCROLL
The eXpress train is coming - and it has more cars.

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: How to clean scroll-bar in DCBROWSECOL?

#3 Post by Eugene Lutsenko »

Thanks!

Instead of prompt how to make visualization of the columns which quantity is in advance not known and is defined by the N_Cls parameter (in the given fragment of the program)? In this example in all columns their values, and value of the last column are displayed not.

Code: Select all

DCSETPARENT oBrowGrSc
DCBROWSECOL FIELD Rsp_it->Kod_Obj   HEADER "Код"                       PARENT oBrowse WIDTH 5
DCBROWSECOL FIELD Rsp_it->Name_Obj  HEADER "Наим.объекта расп.выборки" PARENT oBrowse WIDTH 22
DCBROWSECOL FIELD Rsp_it->Max_Value HEADER "MAX уров.сходства"         PARENT oBrowse WIDTH 5 COLOR GRA_CLR_RED
DCBROWSECOL FIELD Rsp_it->KodC_MaxV HEADER "Класс"                     PARENT oBrowse WIDTH 5 COLOR GRA_CLR_RED
DCBROWSECOL FIELD Rsp_it->Min_Value HEADER "MIN уров.сходства"         PARENT oBrowse WIDTH 5 COLOR GRA_CLR_BLUE
DCBROWSECOL FIELD Rsp_it->KodC_MinV HEADER "Класс"                     PARENT oBrowse WIDTH 5 COLOR GRA_CLR_BLUE
DCBROWSECOL FIELD Rsp_it->Dost      HEADER "Достоверность"             PARENT oBrowse WIDTH 5 
FOR j=1 TO N_Cls
    FieldName = "Rsp_it->CLS"+ALLTRIM(STR(j,15))
    HeadName  = "Класс:"+ALLTRIM(STR(j,15))     // Может быть можно писать наименования колонок вертикально?
    DCBROWSECOL FIELD &FieldName HEADER HeadName                       PARENT oBrowse WIDTH 6 
NEXT

User avatar
Auge_Ohr
Posts: 1428
Joined: Wed Feb 24, 2010 3:44 pm

Re: How to clean scroll-bar in DCBROWSECOL?

#4 Post by Auge_Ohr »

Eugene Lutsenko wrote:

Code: Select all

FOR j=1 TO N_Cls
    FieldName = "Rsp_it->CLS"+ALLTRIM(STR(j,15))
    HeadName  = "Класс:"+ALLTRIM(STR(j,15)) 
    DCBROWSECOL FIELD &FieldName HEADER HeadName   PARENT oBrowse WIDTH 6 
NEXT
this seem me a Classic Problem of "detached local" ;)
greetings by OHR
Jimmy

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

Re: How to clean scroll-bar in DCBROWSECOL?

#5 Post by rdonnay »

Are you sure that oBrowse is the correct parent?
The eXpress train is coming - and it has more cars.

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: How to clean scroll-bar in DCBROWSECOL?

#6 Post by Eugene Lutsenko »

rdonnay wrote:Are you sure that oBrowse is the correct parent?
It seems yes. With the fixed set of columns all it is correctly to work. But here I in general cleaned PARENT, but everything works just as earlier (incorrectly). I tried different options but while it turned out nothing:

Code: Select all

/* ----- Create browse-1 ----- */

bScale := {|| Rsp_it->(DC_SetScope(0,Int_krit->KOD_IntKr)), ;
              Rsp_it->(DC_SetScope(1,Int_krit->KOD_IntKr)), ;
              Rsp_it->(DC_DbGoTop()),                       ;
              oBrowGrSc:refreshAll() }

@ 1, 0 DCBROWSE oBrowScale ALIAS 'Int_krit' SIZE 41.5,3.4 ;
       PRESENTATION DC_BrowPres()                         ;       // Только просмотр БД
       NOSOFTTRACK ;
       SCOPE ;
       NOHSCROLL NOVSCROLL ;       // Убрать горизонтальную и вертикальную полосы прокрутки
       ITEMMARKED {|| Eval(bScale), ;
                      DC_GetRefresh(GetList,, ;
                      DCGETREFRESH_TYPE_EXCLUDE,{GETLIST_BROWSE}) }

DCSETPARENT oBrowScale
DCBROWSECOL FIELD Int_krit->KOD_IntKr  HEADER 'Код'                   WIDTH 1
DCBROWSECOL FIELD Int_krit->NAME_IntKr HEADER 'Интегральный критерий' WIDTH 21


/* ----- Create browse-2 ----- */

DCSETPARENT TO

@ 5, 0 DCBROWSE oBrowGrSc ALIAS 'Rsp_it' SIZE 132,22 ;
       PRESENTATION DC_BrowPres() ;           // Только просмотр БД
       NOSOFTTRACK ;
       HEADLINES 3 ;                          // Кол-во строк в заголовке (перенос строки - ";")
       SCOPE ;
       ITEMMARKED bItems

// MAX - красным, MIN - синим

DCSETPARENT oBrowGrSc
DCBROWSECOL DATA {|x|x:=Rsp_it->Kod_Obj,  IIF(Empty(x),'',Str(x,5))} HEADER "Код"                       WIDTH 5
DCBROWSECOL FIELD Rsp_it->Name_Obj                                   HEADER "Наименование объекта;распознаваемой выборки" WIDTH 25
DCBROWSECOL DATA {|x|x:=Rsp_it->Max_Value,IIF(Empty(x),'',Str(x,5))} HEADER "MAX;уров.;сходства"        WIDTH 8 COLOR GRA_CLR_RED
DCBROWSECOL DATA {|x|x:=Rsp_it->KodC_MaxV,IIF(Empty(x),'',Str(x,5))} HEADER "Класс"                     WIDTH 5 COLOR GRA_CLR_RED
DCBROWSECOL DATA {|x|x:=Rsp_it->Min_Value,IIF(Empty(x),'',Str(x,5))} HEADER "MIN;уров.;сходства"        WIDTH 8 COLOR GRA_CLR_BLUE
DCBROWSECOL DATA {|x|x:=Rsp_it->KodC_MinV,IIF(Empty(x),'',Str(x,5))} HEADER "Класс"                     WIDTH 5 COLOR GRA_CLR_BLUE
DCBROWSECOL DATA {|x|x:=Rsp_it->Dost,     IIF(Empty(x),'',Str(x,5))} HEADER "Досто-;верность"           WIDTH 8 

FOR j=1 TO N_Cls
    FieldName = "Rsp_it->CLS"+ALLTRIM(STR(j,15))
    HeadName  = "Класс:"+ALLTRIM(STR(j,15))     // Может быть можно писать наименования колонок вертикально?
    DCBROWSECOL FIELD &FieldName HEADER HeadName WIDTH 7 
NEXT
*DCBROWSECOL FIELD Rsp_it->Int_krit  HEADER "Инт.критерий"  WIDTH 5 

DCGETOPTIONS SAYFONT '10.Helv Bold' TABSTOP AUTORESIZE

cTitle = '4.1.3.5. Подробная сжатая форма результатов распознавания'+'. Текущая модель: "'+UPPER(Ar_Model[M_CurrInf])+'"'

DCREAD GUI ;
   FIT ;
   OPTIONS GetOptions ;
   MODAL ;
   TITLE cTitle ;
   EVAL {|o|SetAppFocus(oBrowScale:GetColumn(1))}

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: How to clean scroll-bar in DCBROWSECOL?

#7 Post by Eugene Lutsenko »

Auge_Ohr wrote:
Eugene Lutsenko wrote:

Code: Select all

FOR j=1 TO N_Cls
    FieldName = "Rsp_it->CLS"+ALLTRIM(STR(j,15))
    HeadName  = "Класс:"+ALLTRIM(STR(j,15)) 
    DCBROWSECOL FIELD &FieldName HEADER HeadName   PARENT oBrowse WIDTH 6 
NEXT
this seem me a Classic Problem of "detached local" ;)
And that it for problems: "detached local"?

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

Re: How to clean scroll-bar in DCBROWSECOL?

#8 Post by rdonnay »

I don't see anything wrong with this code.
I suspect that the columns are not visible because they are scrolled off the screen.
Make the browse wider or make sure you have a horizontal scrollbar.

If that doesn't work, then I will help you with this if you can give me a small program that I can compile and run.
The eXpress train is coming - and it has more cars.

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: How to clean scroll-bar in DCBROWSECOL?

#9 Post by Eugene Lutsenko »

Thanks, Roger! You already solved this question in a subject:
http://bb.donnay-software.com:8080/phpB ... ?f=2&t=828
I experimented much, didn't come yet to that option which you corrected in this subject and it began to work as it is necessary. And that code didn't work and columns were visible, but with empty or with data from other columns.

Post Reply