• Get Tbrowse

    From MedHome@21:1/5 to All on Mon Jul 3 07:59:28 2023
    Hi All,

    I want to achieve a master-detail form with tgetlist system using get tbrowse behavior. I write down this sample below:
    Piece of the sample
    otb1:border := b_double
    otb2:border := b_simple
    @ 1,0,10,maxcol() GET u tbrowse otb1 MESSAGE( otb1:cargo) WHEN {|c|getAlias(c)}
    @ 11,0,20,maxcol() GET u2 tbrowse otb2 SEND control:forcestable() MESSAGE( otb2:cargo) WHEN {|c|getAlias(c)}
    READ MSG AT 0,21,30 msg COLOR "gb+/B"
    Return

    FUNCTION getAlias(ctrl)
    LOCAL objGet
    objGet := GETACTIVE(ctrl)

    ctrl is the active tbrowse
    objget is the last tbrowse

    I hb_dispbox(objget:control:ntop,objget:control:nleft,objget:control:nbottom,objget:control:nright,B_SINGLE,'w/n')
    hb_dispbox(ctrl:control:ntop,ctrl:control:nleft,ctrl:control:nbottom,ctrl:control:nright,B_DOUBLE,'r+/n')
    RETURN (.T.)

    In fact just after last hb_dispbox the borders are restored to the old values
    I did not find out where it's done in tgetlist.prg any idea?

    The result must be : active border with red color and last border with white color


    Regards

    Med

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)