Skip to content

Commit 2b69503

Browse files
committed
Add NOCONTEXTMENU to EditBox and Spinner
2022-05-29 19:16 UTC-0300 Fernando Yurisich <[email protected]> * ide\fmgs\formedit.prg + Support for NOCONTEXTMENU to EditBox and Spinner controls. #27
1 parent 2bfc6cb commit 2b69503

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

prgs/formedit.prg

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8229,8 +8229,8 @@ METHOD pEditbox( i ) CLASS TFormEditor
82298229

82308230
LOCAL aBackColor, aFontColor, cCargo, cField, cFocusedPos, cFontName, cHelpID, cInsertType, cMaxLength, cObj, cOnChange
82318231
LOCAL cOnGotFocus, cOnHScroll, cOnLostFocus, cOnVScroll, cParent, cSubClass, cToolTip, cVal, cValue, lBold, lBreak, lEnabled
8232-
LOCAL lItalic, lNoBorder, lNoHScroll, lNoTabStop, lNoVScroll, lReadonly, lRTL, lStrikeout, lUnderline, lUndo, lVisible, nCol
8233-
LOCAL nFontSize, nHeight, nRow, nWidth, oCtrl, uFontName, uFontSize
8232+
LOCAL lItalic, lNoBorder, lNoContext, lNoHScroll, lNoTabStop, lNoVScroll, lReadonly, lRTL, lStrikeout, lUnderline, lUndo
8233+
LOCAL lVisible, nCol, nFontSize, nHeight, nRow, nWidth, oCtrl, uFontName, uFontSize
82348234

82358235
/* Load properties */
82368236
nRow := Val( ::ReadCtrlRow( i ) )
@@ -8296,6 +8296,7 @@ METHOD pEditbox( i ) CLASS TFormEditor
82968296
lUndo := ( ::ReadLogicalData( i, "UNDO", "F" ) == "T" )
82978297
cParent := ::ReadStringData( i, "PARENT", "" )
82988298
cParent := ::ReadStringData( i, "OF", cParent )
8299+
lNoContext := ( ::ReadLogicalData( i, "NOCONTEXTMENU", "F" ) == "T" )
82998300
cCargo := ::ReadCargo( i, "LASTFORM.LASTCONTROL.CARGO" )
83008301

83018302
/* Save properties */
@@ -8335,6 +8336,7 @@ METHOD pEditbox( i ) CLASS TFormEditor
83358336
::aBreak[i] := lBreak
83368337
::aParent[i] := cParent
83378338
::aUndo[i] := lUndo
8339+
::aNoContext[i] := lNoContext
83388340
::aCargo[i] := cCargo
83398341

83408342
/* Create control */
@@ -10810,8 +10812,9 @@ METHOD pSlider( i ) CLASS TFormEditor
1081010812
METHOD pSpinner( i ) CLASS TFormEditor
1081110813

1081210814
LOCAL aBackColor, aFontColor, cCargo, cCue, cFontName, cHelpId, cIncrement, cObj, cOnChange, cOnGotfocus, cOnLostfocus, cParent
10813-
LOCAL cRange, cSubClass, cToolTip, cVal, cValue, lBold, lBoundText, lEnabled, lItalic, lNoBorder, lNoTabStop, lReadOnly, lRTL
10814-
LOCAL lStrikeout, lUnderline, lVisible, lWrap, nCol,nFontSize, nHeight, nRow, nWidth, oCtrl, uFontName, uFontSize
10815+
LOCAL cRange, cSubClass, cToolTip, cVal, cValue, lBold, lBoundText, lEnabled, lItalic, lNoBorder, lNoContext, lNoTabStop
10816+
LOCAL lReadOnly, lRTL, lStrikeout, lUnderline, lVisible, lWrap, nCol,nFontSize, nHeight, nRow, nWidth, oCtrl, uFontName
10817+
LOCAL uFontSize
1081510818

1081610819
/* Load properties */
1081710820
nRow := Val( ::ReadCtrlRow( i ) )
@@ -10871,6 +10874,7 @@ METHOD pSpinner( i ) CLASS TFormEditor
1087110874
cParent := ::ReadStringData( i, "OF", cParent )
1087210875
cCue := ::ReadStringData( i, "CUEBANNER", "" )
1087310876
cCue := ::ReadStringData( i, "PLACEHOLDER", cCue )
10877+
lNoContext := ( ::ReadLogicalData( i, "NOCONTEXTMENU", "F" ) == "T" )
1087410878
cCargo := ::ReadCargo( i, "LASTFORM.LASTCONTROL.CARGO" )
1087510879

1087610880
/* Save properties */
@@ -10905,6 +10909,7 @@ METHOD pSpinner( i ) CLASS TFormEditor
1090510909
::aSubClass[i] := cSubClass
1090610910
::aCue[i] := cCue
1090710911
::aParent[i] := cParent
10912+
::aNoContext[i] := lNoContext
1090810913
::aCargo[i] := cCargo
1090910914

1091010915
/* Create control */
@@ -14308,6 +14313,9 @@ METHOD MakeControls( j, Output, nRow, nCol, nWidth, nHeight, nSpacing, nLevel )
1430814313
IF ::aBreak[j]
1430914314
Output += " ;" + CRLF + Space( nSpacing * ( nLevel + 1 ) ) + "BREAK"
1431014315
ENDIF
14316+
IF ::aNoContext[j]
14317+
Output += " ;" + CRLF + Space( nSpacing * ( nLevel + 1 ) ) + "NOCONTEXTMENU"
14318+
ENDIF
1431114319
IF NOTEMPTY( ::aCargo[j] )
1431214320
Output += CRLF + CRLF + Space( nSpacing * nLevel ) + "LastForm.LastControl.Cargo := " + AllTrim( ::aCargo[j] )
1431314321
ENDIF
@@ -16373,14 +16381,17 @@ METHOD MakeControls( j, Output, nRow, nCol, nWidth, nHeight, nSpacing, nLevel )
1637316381
Output += " ;" + CRLF + Space( nSpacing * ( nLevel + 1 ) ) + "DISABLED"
1637416382
ENDIF
1637516383
IF ::aBoundText[j]
16376-
Output += " ;" + CRLF + Space( nSpacing * ( nLevel + 1 ) ) + "BOUNDTEXT"
16384+
Output += " ;" + CRLF + Space( nSpacing * ( nLevel + 1 ) ) + "BOUNDTEXT"
1637716385
ENDIF
1637816386
IF NOTEMPTY( ::aSubClass[j] )
1637916387
Output += " ;" + CRLF + Space( nSpacing * ( nLevel + 1 ) ) + "SUBCLASS " + AllTrim( ::aSubClass[j] )
1638016388
ENDIF
1638116389
IF NOTEMPTY( ::aCue[j] )
1638216390
Output += " ;" + CRLF + Space( nSpacing * ( nLevel + 1 ) ) + "CUEBANNER " + AllTrim( ::aCue[j] )
1638316391
ENDIF
16392+
IF ::aNoContext[j]
16393+
Output += " ;" + CRLF + Space( nSpacing * ( nLevel + 1 ) ) + "NOCONTEXTMENU"
16394+
ENDIF
1638416395
IF NOTEMPTY( ::aCargo[j] )
1638516396
Output += CRLF + CRLF + Space( nSpacing * nLevel ) + "LastForm.LastControl.Cargo := " + AllTrim( ::aCargo[j] )
1638616397
ENDIF
@@ -18261,6 +18272,7 @@ METHOD PropertiesClick() CLASS TFormEditor
1826118272
{ "Invisible", ::aInvisible[j], .F. }, ;
1826218273
{ "MaxLength", ::aMaxLength[j], 1000 }, ;
1826318274
{ "NoBorder", ::aNoBorder[j], .F. }, ;
18275+
{ "NoContextMenu", ::aNoContext[j], .F. }, ;
1826418276
{ "NoHScroll", ::aNoHScroll[j], .F. }, ;
1826518277
{ "NoTabStop", ::aNoTabStop[j], .F. }, ;
1826618278
{ "NoVScroll", ::aNoVScroll[j], .F. }, ;
@@ -18294,6 +18306,7 @@ METHOD PropertiesClick() CLASS TFormEditor
1829418306
::aInvisible[j] := aResults[ ++k ]
1829518307
::aMaxLength[j] := aResults[ ++k ]
1829618308
::aNoBorder[j] := aResults[ ++k ]
18309+
::aNoContext[j] := aResults[ ++k ]
1829718310
::aNoHScroll[j] := aResults[ ++k ]
1829818311
::aNoTabStop[j] := aResults[ ++k ]
1829918312
::aNoVScroll[j] := aResults[ ++k ]
@@ -19475,6 +19488,7 @@ METHOD PropertiesClick() CLASS TFormEditor
1947519488
{ "Increment", ::aIncrement[j], 1000 }, ;
1947619489
{ "Invisible", ::aInvisible[j], .F. }, ;
1947719490
{ "NoBorder", ::aNoBorder[j],, .F. }, ;
19491+
{ "NoContextMenu", ::aNoContext[j], .F. }, ;
1947819492
{ "NoTabStop", ::aNoTabStop[j], .F. }, ;
1947919493
{ "Parent", ::aParent[j], 1000 }, ;
1948019494
{ "Range", ::aRange[j], 1000 }, ;
@@ -19505,6 +19519,7 @@ METHOD PropertiesClick() CLASS TFormEditor
1950519519
::aIncrement[j] := aResults[ ++k ]
1950619520
::aInvisible[j] := aResults[ ++k ]
1950719521
::aNoBorder[j] := aResults[ ++k ]
19522+
::aNoContext[j] := aResults[ ++k ]
1950819523
::aNoTabStop[j] := aResults[ ++k ]
1950919524
::aParent[j] := aResults[ ++k ]
1951019525
::aRange[j] := aResults[ ++k ]

0 commit comments

Comments
 (0)