How to get the current line number in DCBROWSE

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 get the current line number in DCBROWSE

#1 Post by Eugene Lutsenko »

How to get the current line number in DCBROWSE?

IIF(VAL(Num_Appl)=10
IIF(VAL(Num_Appl)=[the current line number]

Code: Select all

@ 1, 0 DCBROWSE WebAppls ALIAS 'WebAppls' SIZE 212,30 ;
       EDIT xbeBRW_ItemSelected MODE DCGUI_BROWSE_EDITDOWN ;            // Редактирование БД
       NOSOFTTRACK ;
       HEADLINES 2 ;                      // Кол-во строк в заголовке (перенос строки - ";")
       SCOPE ;
       ITEMMARKED bItems;
       COLOR {||IIF(VAL(Num_Appl)=10,{nil,aColor[107]},{nil,GRA_CLR_WHITE})}
[/size]

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

Re: How to get the current line number in DCBROWSE

#2 Post by rdonnay »

Is Num_Appl a field in the WebAppls database?
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 get the current line number in DCBROWSE

#3 Post by Eugene Lutsenko »

Yes
Attachments
WebAppls.zip
(1.96 KiB) Downloaded 601 times

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 get the current line number in DCBROWSE

#4 Post by Eugene Lutsenko »

Roger!
You give the example:

Code: Select all

FUNCTION XSample_100()

/*
This example shows how to use DCQUICKBROWSE for browsing
an array via the Data Access Chain.
*/

LOCAL GetList := {}, oBrowse, aDirectory := Directory(), aHeaders, ;
      aColumns, aColType, aColAlign, aColWidth

IF Val(Version(1)+'.'+Version(2)) < 1.3
  DC_WinAlert('Quick Browse not available in Version 1.2')
  RETURN nil
ENDIF

aColumns :=     { ;
      F_NAME          , ; // Display files as icons
      F_NAME          , ; // Display file names as text
      F_SIZE          , ;
      F_WRITE_DATE    , ;
      F_WRITE_TIME    , ;
      F_CREATION_DATE , ;
      F_CREATION_TIME   }

aHeaders :=     { ;
      " "             , ;
      "File name    " , ;
      "    File size" , ;
      "  Access date" , ;
      "  Access time" , ;
      "Creation date" , ;
      "Creation time"   }

aColType :=     { ;
      { 1, XBPCOL_TYPE_FILEMINIICON }, ;
      nil, ;
      nil, ;
      nil, ;
      nil, ;
      nil, ;
      nil  }

aColWidth :=    { ;
      20, ;
      175, ;
      150, ;
      150, ;
      150, ;
      150, ;
      150 }

aColAlign :=    { ;
   XBPALIGN_VCENTER + XBPALIGN_HCENTER, ;
   XBPALIGN_RIGHT + XBPALIGN_VCENTER, ;
   XBPALIGN_RIGHT + XBPALIGN_VCENTER, ;
   XBPALIGN_RIGHT + XBPALIGN_VCENTER, ;
   XBPALIGN_RIGHT + XBPALIGN_VCENTER, ;
   XBPALIGN_RIGHT + XBPALIGN_VCENTER, ;
   XBPALIGN_RIGHT + XBPALIGN_VCENTER  }

@ 1,1 DCQUICKBROWSE DATA aDirectory SIZE 90,20 ;
   OBJECT oBrowse ;
   COLUMNS aColumns ;
   FONT '10.Courier New' ;
   HEADERS aHeaders ;
   COLTYPE aColType ;
   COLWIDTH aColWidth ;
   COLALIGN aColAlign

DCREAD GUI FIT ADDBUTTONS ;
   MODAL ;
   TITLE 'Quick-Browsing an Array' ;
   EVAL {||oBrowse:setRowHeight(35)}

RETURN nil
*** END OF EXAMPLE ***
[/size]
This example does what I need: selects the current line. But I couldn't repeat when the table view. Can't understand
Attachments
Без имени-1.jpg
Без имени-1.jpg (209.85 KiB) Viewed 6615 times

Post Reply