Hi all,
How can I use Xbase parts like Browse as TOOLTIP
Thanks
Joe
Xbase parts like Browse as TOOLTIP
Re: Xbase parts like Browse as TOOLTIP
Explain how you would like it to work.
Are you wanting to scroll thru the browse?
How do you want the browse to disappear?
Are you wanting to scroll thru the browse?
How do you want the browse to disappear?
The eXpress train is coming - and it has more cars.
Re: Xbase parts like Browse as TOOLTIP
Thanks Roger,
I Have a Browse and would like to have something like:
@ 0,0 DCROWSE .........
----
----
----
DCBROWSECOL FIELD MAST->SurName WIDTH 15 HEADER "Employee Name";
DATATOOLTIP {||.t.} TIPBLOCK {|| _Summary()}
------
Return nil
Static Function _Summary()
LOCAL GetList[0], GetOptions, aDir := Directory("*.*")
@ 0, 0 DCBROWSE oBrowse DATA aDir SIZE 53,11 PRESENTATION DC_BrowPres()
DCSETPARENT oBrowse
DCBROWSECOL ELEMENT 1 HEADER 'Period' WIDTH 6
DCBROWSECOL ELEMENT 2 HEADER 'Gross Income' WIDTH 10
DCBROWSECOL ELEMENT 3 HEADER 'Gross Deduction' WIDTH 10
DCBROWSECOL ELEMENT 4 HEADER 'Net Pay' WIDTH 10
DCSETPARENT
DCGETOPTIONS NORESIZE
DCREAD GUI FIT TITLE 'Summary Sheet' OPTIONS GetOptions BUTTONS DCGUI_BUTTON_EXIT
Return nil
*
Something like this will be very helpful
I Have a Browse and would like to have something like:
@ 0,0 DCROWSE .........
----
----
----
DCBROWSECOL FIELD MAST->SurName WIDTH 15 HEADER "Employee Name";
DATATOOLTIP {||.t.} TIPBLOCK {|| _Summary()}
------
Return nil
Static Function _Summary()
LOCAL GetList[0], GetOptions, aDir := Directory("*.*")
@ 0, 0 DCBROWSE oBrowse DATA aDir SIZE 53,11 PRESENTATION DC_BrowPres()
DCSETPARENT oBrowse
DCBROWSECOL ELEMENT 1 HEADER 'Period' WIDTH 6
DCBROWSECOL ELEMENT 2 HEADER 'Gross Income' WIDTH 10
DCBROWSECOL ELEMENT 3 HEADER 'Gross Deduction' WIDTH 10
DCBROWSECOL ELEMENT 4 HEADER 'Net Pay' WIDTH 10
DCSETPARENT
DCGETOPTIONS NORESIZE
DCREAD GUI FIT TITLE 'Summary Sheet' OPTIONS GetOptions BUTTONS DCGUI_BUTTON_EXIT
Return nil
*
Something like this will be very helpful
Re: Xbase parts like Browse as TOOLTIP
You didn't answer my question.
There are several ways that this can be accomplished:
1. Run the code in the tipblock (creating a dialog window), capture the window to a bitmap object, close the window, return the bitmap object. This would work with the existing datatootip system.
2. Run the code in the tipblock (creating a dialog window), return the dialog object. This would require a design change to the tooltip system, probably hours of work because you have not specified how you want it to behave.
3. Use the xbeM_Enter callback of the XbpCellGroup object of the browse to invoke the code that creates the dialog window and displays it. This would also require a few hours of work because you have not specified how you want it to behave.
You would save me a lot of time if you would specify what behavior you are expecting. By behavior, I mean do you expect to be able to scroll through the browse that is displayed (dynamic) or just display it like a bitmap (static)? A Dynamic browse would create a dozen more questions. It would require a lot more code, such as an event handler. Would you expect it to time out the same as a regular tooltip or wait for you to close the window?
There are several ways that this can be accomplished:
1. Run the code in the tipblock (creating a dialog window), capture the window to a bitmap object, close the window, return the bitmap object. This would work with the existing datatootip system.
2. Run the code in the tipblock (creating a dialog window), return the dialog object. This would require a design change to the tooltip system, probably hours of work because you have not specified how you want it to behave.
3. Use the xbeM_Enter callback of the XbpCellGroup object of the browse to invoke the code that creates the dialog window and displays it. This would also require a few hours of work because you have not specified how you want it to behave.
You would save me a lot of time if you would specify what behavior you are expecting. By behavior, I mean do you expect to be able to scroll through the browse that is displayed (dynamic) or just display it like a bitmap (static)? A Dynamic browse would create a dozen more questions. It would require a lot more code, such as an event handler. Would you expect it to time out the same as a regular tooltip or wait for you to close the window?
The eXpress train is coming - and it has more cars.
Re: Xbase parts like Browse as TOOLTIP
Hi Roger
You opened my eyes to deep concept of TOOLTIP.
Option 1 will not work for me because the browse will not be scrollable, But I love the concept.
Option 2 will be what I am looking for but will not ask you to engage in it now unless you have the time, that will be a great addition to eXpress++
I always say that Xbase++ is a special programming language and I always wish to explore. Roger, you gave us that impetus to be adventurous. It remind me of your interview with Steffen some years back where he predicted that there will be only 2 language companies in the world - Alaska and Microsoft, what do you think now ?
Thanks.
Joe
You opened my eyes to deep concept of TOOLTIP.
Option 1 will not work for me because the browse will not be scrollable, But I love the concept.
Option 2 will be what I am looking for but will not ask you to engage in it now unless you have the time, that will be a great addition to eXpress++
I always say that Xbase++ is a special programming language and I always wish to explore. Roger, you gave us that impetus to be adventurous. It remind me of your interview with Steffen some years back where he predicted that there will be only 2 language companies in the world - Alaska and Microsoft, what do you think now ?
Thanks.
Joe
Re: Xbase parts like Browse as TOOLTIP
If it needs to be scrollable, then I think that option 3 is the best solution for you because I can work something out as a sample program rather than change my code.Option 2 will be what I am looking for but will not ask you to engage in it now unless you have the time, that will be a great addition to eXpress++
A dynamic window cannot be considered the same as a tooltip. The concept isn't the same. It's better to have a solution that can allow optional mouse events to invoke the window. I'll write a sample for you.
The eXpress train is coming - and it has more cars.
Re: Xbase parts like Browse as TOOLTIP
Steffen has always had grandiose visions, just like the development team of Visual Objects. Fortunately for us, his visions produced a much better product than VO. Xbase++ will never become a mainstream language but I have hopes that our little niche will last a long time. There are other languages besides Microsoft. There is Java and other internet languages, but when it comes to desktop languages for business applications, I will take Xbase++ any time.It remind me of your interview with Steffen some years back where he predicted that there will be only 2 language companies in the world - Alaska and Microsoft, what do you think now ?
The eXpress train is coming - and it has more cars.
Re: Xbase parts like Browse as TOOLTIP
Thanks Roger
I will be expecting your sample based on option 3
Joe
I will be expecting your sample based on option 3
Joe
Re: Xbase parts like Browse as TOOLTIP
Here is a sample program in which the Right mouse button is used to popup a new browse window.
In this sample, an entire directory structure can be browsed.
In this sample, an entire directory structure can be browsed.
Code: Select all
#INCLUDE "dcdialog.CH"
FUNCTION Main()
BrowseDir( 'C:' )
RETURN nil
* ----------
FUNCTION BrowseDir( cStartDir )
LOCAL GetList[0], oBrowse, aDir, nPointer := 1, GetOptions
cStartDir += '\'
aDir := Directory( cStartDir + '*.*','D' )
@ 0,0 DCBROWSE oBrowse SIZE 60,20 FONT '10.Lucida Console' ;
RBSELECT DATA aDir POINTER nPointer FIT ;
COLOR {||IIF('D'$aDir[oBrowse:arrayElement,5],{nil,GRA_CLR_CYAN},nil)}
DCBROWSECOL ELEMENT 1 HEADER 'Directory / FileName' WIDTH 50 PARENT oBrowse ;
EVAL {|o|o:dataArea:rbClick := ;
{||IIF('D' $ aDir[nPointer,5],BrowseDir(cStartDir+aDir[nPointer,1]),nil)}}
DCBROWSECOL ELEMENT 5 HEADER 'Attr' WIDTH 4 PARENT oBrowse
DCGETOPTIONS RESIZE RESIZEDEFAULT DCGUI_RESIZE_RESIZEONLY HIDE
DCREAD GUI FIT TITLE 'Directory of ' + cStartDir MODAL SETAPPWINDOW ;
OPTIONS GetOptions ;
EVAL {|o|Cascade(o),o:show()}
RETURN nil
* ---------
PROC appsys ; RETURN
* ---------
STATIC FUNCTION Cascade( oDlg )
LOCAL nCol := 0, nRow, aCoords
nRow := oDlg:parent:currentSize()[2]
aCoords := DC_CascadeCoords(oDlg:parent,.f.,{nRow,nCol},.t.,oDlg)
nRow := aCoords[1] - oDlg:currentSize()[2]
nCol := aCoords[2]
IF Valtype(nCol) = 'N' .AND. Valtype(nRow) = 'N'
oDlg:setPos( { nCol, nRow } )
ENDIF
RETURN nil
The eXpress train is coming - and it has more cars.