FrameBox
Previous topic  First topic  Next topic





Define and Properties


Properties
Status
Default
Planned
Started
Ready
Comments
CREATE FRAMEBOX cName | (cVarName) | &(cExpression) 
      [ ; OF cWindow | (cVarName) | &(cExpression) ]
Parent.Name
  
A reference to the Parent Window
      [ ROW nRow ]
0
  
Row position on container window in pixels coordinates
      [ COL nCol ]
0
  
Col position on container window in pixels coordinates
      [ WIDTH nWidth ]
?
  
The desired width size of the Control in pixels
      [ HEIGHT nHeight ]
?
  
The desired height size of the Control in pixels
      [ ROWBOTTOM nRow ]
n/a
  
Bottom Row position on container window in pixels coordinates. This property adjust the HEIGHT property according the ROW property.
      [ COLRIGHT nCol ]
n/a
  
Right Col position on container window in pixels coordinates. This property adjust the WIDTH property according the COL property.
      [ ENABLED .T. | .F. ]
.T.
  
Enable or Disable control
      [ CAPTION cCaption ]
NIL
  
Control title
      [ FONTNAME "cFontName" ]
Parent.Fontname
  
Font family for control text
      [ FONTSIZE nPoints ]
Parent.FontSize
  
Font size for control text
      [ FONTBOLD .T. | .F. ]
.F.
  
Set Bold attribute to control text
      [ FONTITALIC .T. | .F. ]
.F.
  
Set Italic attribute to control text
      [ FONTUNDERLINE .T. | .F. ]
.F.
  
Set Underline attribute to control text
      [ FONTSTRIKEOUT .T. | .F. ]
.F.
  
Set Strikeout attribute to control text
      [ FONTCOLOR {aFontColor} | aVarFontColor ]
OS.FontColor
  
Set foreground color (text color)
      [ BACKCOLOR {aBackColor} | aVarBackColor ]
OS.BackColor
  
Set background color
      [ BORDERCOLOR {aBorderColor} | aVarBorderColor ]
OS.BorderColor
  
Set color of Framebox's border
      [ BORDERWIDTH nBorderWidth ]
1
  
Set border width of Framebox
      [ TOOLTIP cToolTip ]
NIL
  
Text for display into tooltip
      [ FLAT .T. | .F. ]
.F.
  
Set Height framebox to zero. The framebox lock is like a LINE
      [ VISIBLE .T. | .F. ]
.T.
  
Show or hide control (like methods SHOW and HIDE)
      [ PARENT cControlParent ]   
Get or Set the control name of parent widget
      [ PARENTTYPE n/a ]   
Only for mg_get() function, this property returns the PARENT control type or "" if the parent was not set.
      [ TRANSPARENT .T. | .F. ]
.F.
  ?
      [ NOTABSTOP .T. | .F. ]
.F.
  
This property force that TAB key doesn't stop in this control
      [ CURSOR ]
Qt_ArrowCursor
  
Change the cursor pointer shape for the control. Go to to learn more about it.
      [ CREATE CONTEXT MENU [ cName ] ]   
CONTEXT MENU for control
            [ ......... ]   
You can see properties for this menu in CONTEXT MENU topic
      [ END MENU ]   
 
END FRAMEBOX 

Jump to Context Menu topic



Methods


Methods
Status
Default
Planned
Started
Ready
Comments
    HIDE
n/a
  
This method HIDE the control
    SHOW
n/a
  
This method SHOW the control
    UNSETCURSOR
n/a
  
Reset the cursor pointer shape for the control to default (Qt_ArrowCursor). Go to to learn more about it.
    RELEASE
n/a
  
This method is used to destroy the control.



Example:

File: d_framebox.prg


#include "marinas-gui.ch"

Function main()

   SET APPLSTYLE TO "MarinasLooks"

   CREATE WINDOW d_window
      ROW 0 ; COL 0
      WIDTH 820 ; HEIGHT 480
      CAPTION "Marinas-GUI Sample for FrameBox Control"
      ICON "../resource/d_test.ico"
      BACKCOLOR {216,237,236}
      MAIN .T.

      d_framebox_def()

   END WINDOW

   mg_Do( "d_window" , "center" )

   mg_Do( "d_window" , "activate" )

Return .T.


File: d_framebox_def.prg

#include "marinas-gui.ch"

Function d_framebox_def()

     CREATE FRAMEBOX Fra_FrameBox_1
            ROW    50
            COL    140
            WIDTH  531
            HEIGHT 91
            FONTSIZE 14
            BORDERWIDTH 4
            BORDERCOLOR {255,0,0}
            CAPTION "FrameBox with BACKCOLOR and FONTSIZE"
            BACKCOLOR {21,190,204}
            TOOLTIP "FrameBox ToolTip"

            CREATE CONTEXT MENU

               CREATE ITEM "Item 1 from FrameBox"
                  ONCLICK { || mg_MsgInfo( "Item 1 from FrameBox" ) }
                  PICTURE "../resource/d_test.png"
               END ITEM

               CREATE ITEM "Item 2 from FrameBox"
                  ONCLICK { || mg_MsgInfo( "Item 2 from FrameBox" ) }
                  PICTURE "../resource/d_test.png"
               END ITEM

            END MENU

     END FRAMEBOX

    CREATE BUTTON Fra_Button_1
           ROW    90
           COL    200
           WIDTH  100
           HEIGHT 28
           CAPTION "OK"
           ONCLICK mg_MsgInfo( "Button Pressed" )
     END BUTTON

     CREATE SLIDER Fra_Slider_1
            ROW    90
            COL    450
            WIDTH  120
            HEIGHT 35
            RANGEMIN 1
            RANGEMAX 10
            VALUE 6
     END SLIDER

     CREATE FRAMEBOX Fra_FrameBox_2
            ROW    160
            COL    140
            WIDTH  140
            HEIGHT 140
            FONTBOLD .T.
            CAPTION "BOLD fonts"
            TOOLTIP "FrameBox ToolTip"
     END FRAMEBOX

     CREATE RADIOGROUP Fra_RadioGroup_1
            ROW    181
            COL    171
            WIDTH  106
     //     HEIGHT 28
            FONTCOLOR {255,0,0}
            ITEMS {'India','Italy','Bulgary','Argentina'}
            VALUE 1
     END RADIOGROUP

     CREATE FRAMEBOX Fra_FrameBox_3
            ROW    160
            COL    310
            WIDTH  361
            HEIGHT 140
            FONTITALIC .T.
            CAPTION "FrameBox with ITALIC fonts and FONTCOLOR property"
            FONTCOLOR {128,0,64}
            TOOLTIP "FrameBox ToolTip"
     END FRAMEBOX

     CREATE LABEL Fra_Label1
            ROW    190
            COL    330
            VALUE  "Hello!"
            FONTCOLOR {255,255,255}
            FONTSIZE 28
            FONTBOLD .T.
            WIDTH  322
            HEIGHT 90
            BACKCOLOR {255,0,0}
            ALIGN Qt_AlignCenter
     END LABEL

     CREATE FRAMEBOX Fra_FrameBox_4
            TOOLTIP "FrameBox ToolTip"
            ROW    320
            COL    140
            WIDTH  533
            HEIGHT 74
     END FRAMEBOX

     CREATE LABEL Fra_Label2
            ROW    345
            COL    310
            WIDTH  292
            HEIGHT 25
            VALUE "Sample standard framebox"
            FONTSIZE 13
            FONTBOLD .T.
            FONTCOLOR {87,160,52}
     END LABEL

     CREATE FRAMEBOX Fra_FrameBox_5
            ROW    420
            COL    140
            WIDTH  533
            FONTITALIC .T.
            CAPTION "FrameBox with FLAT"
            FONTCOLOR {128,0,64}
            TOOLTIP "FrameBox ToolTip"
            FLAT .T.
     END FRAMEBOX

Return .T.



Marinas-GUI Version 03.06 and
Marinas-IDE Version 05.06 and
LEX Files Version 02.06


---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
last update: March 09
2017
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------




A Harbour/QT framework to make multiplatform programs

(©) Copyright 2009-2017 by Fernando Santolin (aka CarozoDeQuilmes)
CarozoDeQuilmes@gmail.com

2009-2017 Beta tester and full English translator: Bruno Luciani
Bruno.Luciani@gmail.com

2014-2015 Final English corrector: David Worboys
DavidWorboys@hotmail.com

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Jump to Donation Topic


---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

www.marinas-gui.org


www.marinas-gui.org  

Previous topic  First topic  Next topic