Page 3 of 5

Re: Click in CheckBrowse to Select/Unselect

Posted: Tue May 16, 2017 3:00 am
by Wolfgang Ciriack
Here is an updated example with radiobutton.

Re: Click in CheckBrowse to Select/Unselect

Posted: Tue May 16, 2017 7:03 am
by Eugene Lutsenko
Cool! Everything works fine. I will use it. Thank you.

Probably need to make a field in a database and before starting to write its value into the array and then from array to database?

Re: Click in CheckBrowse to Select/Unselect

Posted: Tue May 16, 2017 7:11 am
by rdonnay
Ok, now I understand what you were trying to do.
Thanks, Wolfgang!

Re: Click in CheckBrowse to Select/Unselect

Posted: Tue Jul 18, 2017 5:47 am
by Eugene Lutsenko
Hello, Wolfgang!

I somehow do not appear the icons of choices, although the elements of the array containing the selected records are generated normally. I have included the file TEST.ch in the program and put it someplace where I can find ch files. Maybe if you replace the variables directly names of their respective image files, they will start to appear? But I just wasn't clear which files correspond to which variables:

BMP_CHECKED - check1.bmp
BMP_UNCHECKED - check2.bmp
BMP_RACHECKED ?
BMP_RAUNCHECKED ?

Re: Click in CheckBrowse to Select/Unselect

Posted: Tue Jul 18, 2017 9:52 am
by Wolfgang Ciriack
Take a look at the test.arc file:

Code: Select all

 BMP_CHECKED        = "check1.bmp"
 BMP_UNCHECKED      = "check2.bmp"
 BMP_RACHECKED      = "radio1.bmp"
 BMP_RAUNCHECKED    = "radio2.bmp"

Re: Click in CheckBrowse to Select/Unselect

Posted: Tue Jul 18, 2017 1:16 pm
by Eugene Lutsenko
Wolfgang Ciriack wrote:Take a look at the test.arc file:

Code: Select all

 BMP_CHECKED        = "check1.bmp"
 BMP_UNCHECKED      = "check2.bmp"
 BMP_RACHECKED      = "radio1.bmp"
 BMP_RAUNCHECKED    = "radio2.bmp"
Thank you! As I have not guessed! And why I have them not displayed? I have these files placed in a folder. In the example, everything works fine. I almost without changes inserted into the program. In an array all right, but on the screen there is no image for these files in the column "Sel"

Re: Click in CheckBrowse to Select/Unselect

Posted: Wed Jul 19, 2017 6:56 am
by Wolfgang Ciriack
Do you have included the arc-file in your project ?

Re: Click in CheckBrowse to Select/Unselect

Posted: Wed Jul 19, 2017 1:39 pm
by Eugene Lutsenko
Hello, Wolfgang!

Is there a way to do without this file? For example write something like:

Code: Select all

DCBROWSECOL DATA {|| iif(AScan(aRecs,recno())>0, iif(!multisel,"radio1.bmp","check1.bmp"), iif(!multisel,"radio2.bmp","check2.bmp")) } ;
            HEADER "Sel" PARENT oBrowse WIDTH 2 ;
            TYPE XBPCOL_TYPE_BITMAP ;
            PROTECT {|| .T.} ;
            ALIGN XBPALIGN_HCENTER+XBPALIGN_VCENTER ;
            EVAL {|oB|oB:dataArea:lbClick := {|a,b,o,w| iif( oBrowse:colPos=1, ;
               ( p:=Ascan(aRecs, recno()), iif(p>0, ARemove(aRecs,p), (iif(!multisel, ASize(aRecs,0), nil), AAdd(aRecs, recno()))), oBrowse:refreshAll()),nil)}}
It may be possible to insert these macros directly in the source text of the program itself?

BITMAP
BMP_CHECKED = "check1.bmp"
BMP_UNCHECKED = "check2.bmp"
BMP_RACHECKED = "radio1.bmp"
BMP_RAUNCHECKED = "radio2.bmp"

Re: Click in CheckBrowse to Select/Unselect

Posted: Sat Jul 22, 2017 12:50 pm
by Eugene Lutsenko
Wolfgang Ciriack wrote:Do you have included the arc-file in your project ?
Included, but left as it was.

For some reason sometimes when you click on the project file starts the compilation resulting in an executable module. And sometimes just flashes a black window and nothing happens. Writes: "specified module Not found"

Code: Select all

//
// Project - Definition - File created by PBUILD Version  1.90.355
// Date: 22.07.2017 Time: 23:43:28
//

[PROJECT]
    COMPILE       = xpp
    COMPILE_FLAGS = /q
    DEBUG         = yes
    GUI           = no
    LINKER        = alink
    LINK_FLAGS    = 
    RC_COMPILE    = arc
    RC_FLAGS      = /v
    VERSION       = 2.0
    OPENFILES     = _AIDOS-X.prg;TEST.ch;TEST.arc;_Aidos-X.arc
    INCLUDE       = c:\ALLDLLCH\
    LIB           = c:\ALLDLLCH\
    _AIDOS-X.XPJ

[_AIDOS-X.XPJ]
    _AIDOS-X.EXE

[_AIDOS-X.EXE]
    COMPILE       = xpp
    COMPILE_FLAGS = /wl /wu /q /rDCLIPX.LIB /rDCLIP1.LIB /w
    DEBUG_SAVE    = yes
    GUI           = yes
    LINKER        = alink
    LINK_FLAGS    = 
    RC_COMPILE    = arc
    RC_FLAGS      = /v
// $START-AUTODEPEND
    _AIDOS-X.RES
    _AIDOS-X.OBJ
    DCCURSOR.CH
    DCICON.CH
    DCBITMAP.CH
    STD.CH
    SET.CH
    NATMSG.CH
    GET.CH
    PROMPT.CH
    MEMVAR.CH
    COLLAT.CH
    INKEY.CH
    DCDIR.CH
    DCDIALOG.CH
    XBP.CH
    GRA.CH
    DCREG.CH
    APPEVENT.CH
    DLL.CH
    THREAD.CH
    CLASS.CH
    DMLB.CH
    FILEIO.CH
    DCTREE.CH
    SYSTEMMETRICS.CH
    COMMON.CH
    DBEDIT.CH
    DBFDBE.CH
    DCAPP.CH
    APP.CH
    DCCARGO.CH
    DCFILES.CH
    DCGRA.CH
    DCGRAPH.CH
    RMCHART.CH
    BDCOLORS.CH
    DCCOLORS.CH
    DCPRINT.CH
    DCMSG.CH
    DCPICK.CH
    DELDBE.CH
    DIRECTRY.CH
    EXPRESS.CH
    FONT.CH
    _DCDBFIL.CH
    _DCAPPE.CH
    DCSCOPE.CH
    _DCSTRU.CH
    DCFIELDS.CH
    DCCOLOR.CH
    TEST.CH
    XB2NET.CH
// $STOP-AUTODEPEND
    _AIDOS-X.ARC
    _AIDOS-X.PRG
    TEST.ARC
[/size]

Re: Click in CheckBrowse to Select/Unselect

Posted: Sat Jul 22, 2017 10:59 pm
by Eugene Lutsenko
Hello, Roger!

Is it possible to get an example similar to the above, but alternative of the choice: 'Radio' (similar to what Wolfgang gave, but working with databases and easier integrable into the system?)?