Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

MsObjSize

MsObjSize(aInfo,aObjects,.T.) -> aPosObj (uso observado / observed call)

Calculates component positions in a legacy layout.

MsObjSizeAdvPL
01 · OVERVIEW

Overview

The official TCBrowse example obtains aSize from MsAdvSize, builds aInfo from its first four positions and two margins, and passes aInfo/aObjects/.T. to MsObjSize. The returned aPosObj positions a browse and button. This page documents that observed use without assigning an unpublished name or meaning to argument three. The historical manual shows the same pattern. It is not a generic responsive-layout algorithm for every client. (Sources: refs. 1–2.)

02 · SYNTAX

Syntax

MsObjSize(aInfo,aObjects,.T.) -> aPosObj (uso observado / observed call)

Parameters

aInfo
ArrayRequired

Window data from MsAdvSize and margins as shown in the example.

aObjects
ArrayRequired

Object specifications as shown in the consulted example.

3º argumento / third argument
LogicalRequired

Example passes .T.; the detailed contract is not explained.

Return value

Position array used by the example; verify structure in the runtime.

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed549()
    // Arrays must follow the source example; block not invoked.
    Local bLayout := {|aInfo,aObjects| MsObjSize(aInfo,aObjects,.T.)}
    ConOut(ValType(bLayout))
Return Nil
Expected result

Prints B; evaluation requires suitable arrays and UI context. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Check rectangle count/order before indexing aPosObj. Test scaling, fonts and minimum sizes in the deployed client. Do not copy another layout’s indexes without validating dimensions.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. TCBrowse:SetFilter — exemplo com MsObjSize. Central de Atendimento, 2021. Accessed on 2026-10-27.
  2. Waterloo Ferreira da Silva. AdvPL — O Manual, versão 1.0, p. 116. Referência histórica. Accessed on 2026-10-27.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR
0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha