OK ... here is probably a basic question but I'm suffering a very stuffy head today ...
I have some controls that work OK in a window but not a dialog. I have some controls that work OK in a dialog, but not a window. I need to use both concurrently.
This is a non-MDI application !
I tried opening the window and dialog together. A button bar (OK on either ) and calendar control (which won't work on a dialog ) exist on the window. Thats no problem. Now I want to also use the dialog. It contains edit fields, buttons, and a TSBrowse ( which doesn't want to work on a window. The problem is getting the dialog into a decent position. I also need to then be able to click on window or dialog objects at any time.
I tried:
DEFINE WINDOW ...
DEFINE DIALOG ...
ACTIVATE DIALOG NOWAIT
ACTIVATE WINDOW
It shows, but no matter what I do, I'm not successful getting the dialog to get into a position other then the upper left corner which overshadows the window controls.
So, anyone have some sample code that shows bringing up a dialog in a window, and using it cleanly, with repositioning ?
Thanks.
Dialog/Window merge
Dialog/Window merge
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Tim,
TSBrowse works on a window for me.
James
TSBrowse works on a window for me.
James
Code: Select all
#include "fivewin.ch"
#include "tsbrowse.ch"
function main()
local oWnd, oLbx, oCustomer
oCustomer:= TData():new(,"customer")
oCustomer:use()
define window oWnd
@0,0 browse oLbx
add column to oLbx header "First" data oCustomer:first
add column to oLbx header "Last" data oCustomer:last
oLbx:bSkip := { | nRecs | oCustomer:skipper( nRecs ) }
oWnd:oClient:= oLbx
activate window oWnd
return nil
Window & dialog
I'll have to take another run at it shortly with TSBrowse. I tried blocking all of the code except for a couple of items, and then starting a window with one control, and trying to add TSBrowse ... but it would only show me a plain white box ( small ).
I think I'll start building up from the empty basic window instead of commenting out several hundred lines of code ... maybe that will help me resolve this ...
Tim
I think I'll start building up from the empty basic window instead of commenting out several hundred lines of code ... maybe that will help me resolve this ...
Tim
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
TSBrowse in a window
No matter what I set @ x, y to, it always starts the browse at 0,0 and no matter what SIZE I enter, it takes the full window ... so no other controls will display ...
Tim
Tim
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Test
It starts at 0,0 and fills the whole screen ...
#include "FiveWin.ch"
#INCLUDE "tsbrowse.CH"
FUNCTION Main
LOCAL oWndc, oInv, oLbx
oInv := TData():new(, "c:\asw8s\einmst")
oInv:use( )
DEFINE WINDOW oWndc TITLE "Example"
@ 10, 10 BROWSE oLbx SIZE 300, 100 PIXEL
add column to oLbx header "One" data oInv:invnum
add column to oLbx header "Two" data oInv:invdes
oLbx:bSkip := { |nRecs| oInv:skipper( nRecs )}
oWndc:oClient := oLbx
ACTIVATE WINDOW oWndc MAXIMIZED
RETURN nil
#include "FiveWin.ch"
#INCLUDE "tsbrowse.CH"
FUNCTION Main
LOCAL oWndc, oInv, oLbx
oInv := TData():new(, "c:\asw8s\einmst")
oInv:use( )
DEFINE WINDOW oWndc TITLE "Example"
@ 10, 10 BROWSE oLbx SIZE 300, 100 PIXEL
add column to oLbx header "One" data oInv:invnum
add column to oLbx header "Two" data oInv:invdes
oLbx:bSkip := { |nRecs| oInv:skipper( nRecs )}
oWndc:oClient := oLbx
ACTIVATE WINDOW oWndc MAXIMIZED
RETURN nil
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Browse
Apparently I have other issues in that .prg ... so I'm working on trying it from scratch ... and cut/paste from the other file ... seems to be OK so far.
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019