TOOLTIP - CAN IT BE A BROWSE DIALOG ?

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
unixkd
Posts: 579
Joined: Thu Feb 11, 2010 1:39 pm

TOOLTIP - CAN IT BE A BROWSE DIALOG ?

#1 Post by unixkd »

Hi All

I would like to make my Tooltip text to be a browse dialog ?

Joe

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

Re: TOOLTIP - CAN IT BE A BROWSE DIALOG ?

#2 Post by rdonnay »

Is the browse a database or an array?
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: TOOLTIP - CAN IT BE A BROWSE DIALOG ?

#3 Post by rdonnay »

The tooltip system wasn't designed for this, but I threw together a little program to give you some ideas.
I don't guarantee that this will work the way you want it to.

Code: Select all

#INCLUDE "dcdialog.CH"

FUNCTION Main()

LOCAL GetList[0], cFileName := Space(30), oGet

@ 0,0 DCSAY 'Enter File Name' GET cFileName ;
      GETOBJECT oGet ;
      GETTOOLTIP {||ShowDialog(oGet,@cFileName,GetList)} ;
      SAYSIZE 0

DCREAD GUI FIT TITLE 'Drag Enter' SETAPPWINDOW

RETURN nil

PROC appsys ; return


STATIC FUNCTION ShowDialog(oGet,cFileName,aGetList)

LOCAL GetList[0], GetOptions, oBrowse, aDir, nPointer := 1

aDir := Directory()

@ 0,0 DCBROWSE oBrowse DATA aDir SIZE 20,10 FIT ;
      POINTER nPointer ;
      ITEMSELECTED {||cFileName := Pad(aDir[nPointer,1],30), ;
                      DC_ReadGuiEvent(DCGUI_EXIT_OK,GetList)}

DCBROWSECOL ELEMENT 1 HEADER 'File Name' WIDTH 20 PARENT oBrowse

DCGETOPTIONS ORIGIN XBPDLG_ORIGIN_MOUSE

DCREAD GUI FIT TITLE 'Directory' MODAL OPTIONS GetOptions

DC_GetRefresh(aGetList)

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

User avatar
unixkd
Posts: 579
Joined: Thu Feb 11, 2010 1:39 pm

Re: TOOLTIP - CAN IT BE A BROWSE DIALOG ?

#4 Post by unixkd »

Many thanks Roger,

Your sample really gave me a direction towards what I want, I will spend some time modifying it to see how far I can go. One of the strength of Xbase++ is doing something near impossibility. I really want to anchor this tooltip to the TIPBLOCK of BROWSE

Once more Accept my many thanks.

Joe

Post Reply