Newbie Question : XBROWSE

Re: Newbie Question : XBROWSE

Postby nageswaragunupudi » Sun Nov 27, 2022 8: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: Select all  Expand view

#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
 


Image

so DIALOG is only when i do not want "resize" (which i most allow)

WRONG CONCLUSION, obviously.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Newbie Question : XBROWSE

Postby nageswaragunupudi » Sun Nov 27, 2022 8: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: Select all  Expand view
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
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Newbie Question : XBROWSE

Postby Jimmy » Sun Nov 27, 2022 9: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
User avatar
Jimmy
 
Posts: 1586
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 60 guests