DCBROWSE ... DATATOOLTIP

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
Tom
Posts: 1234
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

DCBROWSE ... DATATOOLTIP

#1 Post by Tom »

Looks like the DATATOOLTIP/TIPBLOCK-clauses in browses showing arrays only work correctly if the array is already filled when the browse comes up.

Code: Select all

aDir := {}

@ 1,1 DCBROWSE oBrowse DATA aDir ... 
DCBROWSECOL ELEMENT 1 DATATOOLTIP {||.T.} TIPBLOCK {|n|Var2Char(aDir[n,1])}
...

DCREAD GUI EVAL {||aDir := Directory(),oBrowse:RefreshAll()}
In this case, no tooltip is shown and "n" is always "1". If the first line is changed to "aDir := Directory()" and this is removed from DCREAD ..., the TIPBLOCK works correctly.

Background: I have several browses showing different data depending on the user input in the same dialog, so the array contens changes. In those dialogs, the browses are initially empty.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

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

Re: DCBROWSE ... DATATOOLTIP

#2 Post by rdonnay »

I believe that this problem is due to the fact that you are creating a new array pointer and the tipblock is bound to the original pointer.

Try this:

Code: Select all

DCBROWSECOL ELEMENT 1 DATATOOLTIP {||.T.} TIPBLOCK {|n|Var2Char(aDir[n,1])}

DCREAD GUI EVAL {||FillArray(aDir)}

STATIC FUNCTION FillArray(aDir)

LOCAL aDir2

ASize(aDir,0)
aDir2 := Directory()
FOR i := 1 TO Len(aDir2)
  AAdd(aDir,aDir2[i])
NEXT

RETURN nil
The eXpress train is coming - and it has more cars.

User avatar
Tom
Posts: 1234
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: DCBROWSE ... DATATOOLTIP

#3 Post by Tom »

Hi, Roger.

I checked this. I use DC_GetBrowArray(oBrowse,aArray) inside the function which refill the arrays.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

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

Re: DCBROWSE ... DATATOOLTIP

#4 Post by rdonnay »

It isn't the browse that's the problem, it's the tipblock.

Try my suggestion and see if it works.
The eXpress train is coming - and it has more cars.

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

Re: DCBROWSE ... DATATOOLTIP

#5 Post by rdonnay »

Tom -

Was this problem ever resolved for you?
I just discovered that tipblocks do not work correctly when using the DCBROWSE .. DESCENDING clause.

Roger
The eXpress train is coming - and it has more cars.

Post Reply