FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Newbie Question : XBROWSE
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Newbie Question : XBROWSE
Posted: Sun Nov 27, 2022 08:16 AM
when using DIALOG instead of WINDOW i can not "maximize" :shock:
WRONG.
Use "RESIZABLE" clause while defining the DIALOG. Ref: dialog.ch
also BUTTONBAR does not appear when use oWnd:oClient := oBrwDBF ...
ALSO WRONG.
Just oDlg:Resize().

Test program (build and run in fwh\samples folder)
Code (fw): Select all Collapse
#include "fivewin.ch"

REQUEST DBFCDX

function Main()

   local oDlg, oFont, oBar, oBrw, cAlias

   USE CUSTOMER NEW SHARED ALIAS ( cAlias := cGetNewAlias( "CUST" ) ) VIA "DBFCDX"

   DEFINE FONT oFont NAME "VERDANA" SIZE 0,-14
   DEFINE DIALOG oDlg SIZE 600,400 PIXEL TRUEPIXEL RESIZABLE FONT oFont ;
      TITLE "FWH: RESIZABLE DIALOG"
   DEFINE BUTTONBAR oBar SIZE 90,30 2007
   DEFINE BUTTON OF oBar PROMPT "This is the" CENTER
   DEFINE BUTTON OF oBar PROMPT "Button Bar" CENTER

   @ 0,0 XBROWSE oBrw SIZE 0,0 PIXEL OF oDlg ;
      DATASOURCE Alias() AUTOCOLS CELL LINES ;
      AUTOSORT FOOTERS FASTEDIT NOBORDER

   oBrw:AutoFit()
   oBrw:CreateFromCode()
   oDlg:oClient   := oBrw

   oDlg:bInit  := <||
      SET MESSAGE OF oDlg TO "Message Bar" CENTERED 2007
      oDlg:Resize()
      return nil
      >

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont
   ( cAlias )->( DBCLOSEAREA() )

return nil

so DIALOG is only when i do not want "resize" (which i most allow)
WRONG CONCLUSION, obviously.
Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Newbie Question : XBROWSE
Posted: Sun Nov 27, 2022 08:33 AM
Jimmy wrote:hi,

interesting ... "where" can i read about it in Help File :?:

---

when using DIALOG instead of WINDOW i can not "maximize" :shock:
also BUTTONBAR does not appear when use oWnd:oClient := oBrwDBF ...

so DIALOG is only when i do not want "resize" (which i most allow)
Very obviously, you did not try the single line sample we recommended in our last post:
Code (fw): Select all Collapse
XBROWSER cFileDBF
which would not have taken more than two or three minutes.

Had you tried, you would have already observed that the dialog that xbrowser command creates a DIALOG which can be minimized, zoomed and resized just like a window and you would not have posted this post.
Regards



G. N. Rao.

Hyderabad, India
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: Newbie Question : XBROWSE
Posted: Sun Nov 27, 2022 09:20 AM

hi,

thx for your help.

i´m still a Newbie under Fivewin and have to learn what Controls under Fivewin can do.


as i say i have to learn a lot but 1st i need to understand how Fivewin work different to HMG or Xbase++

i use "old" Xbase++ or HMG CODE and try to "translate" working CODE to Fivewin

i try to use "only" Windows Control which are "same" for all Language so i know how to "translate" into other Dialect


as my TGrid() does not handle DBF yet i have try to use XBROWSE ... much more than i need (yet)

greeting,

Jimmy

Continue the discussion