| **Navigation:**  [[introduction.htm|Language Reference]] > 13 - Built-in Functions >====== SETLAYOUT (set window orientation) ====== | [[setkeycode specify keycode .htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[setnonull set file field non null .htm|{{btn_next_n.gif|Next page}}]] | | || {{newc7.jpg|NewC7.jpg}} **SETLAYOUT(** //window// , //layout //**)** {{blk2blue.jpg|blk2blue.jpg}} | **SETLAYOUT** | Dynamically sets the window or report orientation. | | //window// | Label of a WINDOW, APPLICATION or REPORT structure, or a value of the reference variable of the type &WINDOW, or a procedure parameter of the type WINDOW, or a built-in TARGET variable. | | //layout// | A BYTE value or variable that specifies the //window// orientation. Zero (0) sets a left-to-right layout and one (1) sets a right-to-left layout. | **SETLAYOUT** is valid for WINDOWs and REPORTs only. It allows you to change the window or report layout both before //and// after opening them. SETLAYOUT is equivalent to **window{PROP:Layout}=n** but is a little more efficient. Windows or reports that are not opened cannot be used as a value of the built-in TARGET variable. So, the call: SETLAYOUT (TARGET, n) will ONLY change the layout of the active opened //window// in the current thread. If there are no active //window//s in the current thread ,it is implicitly applied to the MDI frame window (if it exists), or simply ignored otherwise. **Example:** **SETLAYOUT(QuickWindow,1)     !Set up right-to-left orientation** **See Also:** [[layout set window orientation .htm|LAYOUT]]