Jump to content

Search the Community

Showing results for tags 'Layout'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Categories

There are no results to display.

Forums

  • Welcome to Smart Mobile Studio
    • News and Information
    • Pre-Sales Questions
    • Smart In the Media
    • Smart Contests
    • Meta
  • Smart Mobile Studio Discussion
    • General
    • IDE
    • RTL
    • Code
    • Client Server
    • Platform
    • Graphics
    • Deployment
    • Suggestion box
  • Smart Mobile Studio support
    • Support
    • Bug report
  • General Discussion
    • Pascal
    • Delphi
    • Javascript
    • HTML/HTML5
    • CSS
  • Resources
    • Website
    • Download Smart Mobile Studio

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Location


Interests


Company name


Position

Found 8 results

  1. IElite

    FYI - TLayout - Beginner

    I will be posting a number of examples on how to use the TLayout object. I will be using tags (e.g. layout, tlayout, beginner) so that you can find them easily enough in the future. Please be sure to read the Articles by @gabr42 http://smartmobilestudio.com/documentation/layout-manager FYI - TLayout - Beginner - How to center a control on the form Code on GitHub
  2. IElite

    FYI - TLayout - Intermediate

    This is a continuation of examples on how to use the TLayout object. I will be using tags (e.g. layout, tlayout, intermediate) so that you can find them easily enough in the future. Please be sure to read the Articles by @gabr42 http://smartmobilestudio.com/documentation/layout-manager as well as visit the beginner thread FYI - TLayout - Intermediate - How to layout a control with nested controls on the form Note: This example shows how to layout controls onto another control on the form Profile Landscape Code on GitHub
  3. recursiveElk

    Layout sizing of components issue

    Hi, I've run into a problem where if i compile and run the program through the SMS IDE and "Open in Browser" it displays correctly. But when i run it locally from the generated 'www' folder index.html, it displays incorrectly. Here is what it should look like ( and does in chrome eg http://111.111.1.11:1111/index.html): https://puu.sh/wwUx3/54a855dc53.png Here is what it looks like when run in chrome from the www/index.html ( eg file:///C:/#####//www/index.html) : https://puu.sh/wwUAG/7ccc07ff32.png OR https://puu.sh/wwUTA/5a2a9a4b88.png Source Code(.Rar): https://puu.sh/wwUH5/ced5d37382.rar Oh also to note i have already tried putting the FLayout1 in InitializeForm.
  4. IElite

    Layout align order for controls?

    Trying to figure out the Layout align order for controls. It looks great when displaying in the built-in browser in SMS, but in outside browsers, or on my cell phone (after build from phonegap), the order of the controls alignment is different. Either my Header control is hidden on the bottom under my listbox, or it is place on top. Depending on the device im testing it in Project Source Test
  5. ok, i need to resize a control based on the layout dimensions. I also need it to resize when the layout dimensions change (e.g. turning device from profile to landscape) It was my assumption that you just check the dimensions of device and adjust accordingly e.g. if ClientHeight > ClientWidth then fHeader.Height:= ClientHeight Div 6 else fHeader.Height:= ClientHeight Div 8; However, where is the best place to put this? I have tried it in the Resize method before my layout resize and after my layout resize. It does not seem to work! Well, it works on the initial activation of the form, but when the form is resize, it does not. While in the IDE, i even have to hit the RELOAD button to get it to work. Below is an example with two components on the form. A TW3HeaderControl aligned to top of form, and a TW3ListBox aligned to client. I would like to adjust the height of the TW3HeaderControl based on whether or not it is in Profile or Landscape e.g. unit Form1; interface uses SmartCL.System, SmartCL.Graphics, SmartCL.Components, SmartCL.Forms, SmartCL.Fonts, SmartCL.Borders, SmartCL.Application, SmartCL.Layout, SmartCL.Controls; type TForm1 = class(TW3Form) private {$I 'Form1:intf'} fLayout: TLayout; fHeader: TW3HeaderControl; fList: TW3ListBox; protected procedure InitializeForm; override; procedure InitializeObject; override; procedure Resize; override; end; implementation { TForm1 } procedure TForm1.InitializeForm; begin inherited; // this is a good place to initialize components fLayout:= Layout.Client([Layout.Top(fHeader), Layout.Client(fList)]); end; procedure TForm1.InitializeObject; begin inherited; {$I 'Form1:impl'} fHeader:= TW3HeaderControl.Create(self); fList:= TW3ListBox.Create(self); end; procedure TForm1.Resize; begin inherited; if assigned(FLayout) then begin fLayout.Resize(self); if ClientHeight > ClientWidth then fHeader.Height:= ClientHeight Div 6 else fHeader.Height:= ClientHeight Div 8; end; end; initialization Forms.RegisterForm({$I %FILE%}, TForm1); end. I even tried overriding the "FormActivated" and placing it there and calling the Resize. What gives? thankx
  6. I would love to see some kind of improvement for nesting layouts. i.e. layouts that have controls in them and layouts with controls in them e,g, Layer 1 Header layout , Main Body layout , Footer layout Layer 2 - Header layout Image, Label, buttons Layer 2 - Content layout Labels, Edits, buttons Layer 2 - Footer layout Image, navigation links (labels) To implement this requires a lot of code Maybe add Layers? Or Maybe allow a Layout to include another Layout as well as controls e.g. Laying out the three layers above //layer1 fLayout:= Layout.Client( [Layout.Top(fLayer2HeaderLayout), Layout.Client(fLayer2ContentLayout), Layout.Bottom(fLayer2FooterLayout)] ); as of now, you have to write too much code, to create all the layouts and then in the resize, you only have to make one call as well if assigned(FLayout) then FLayout.Resize(self); instead of if Assigned(fLayer1Layout) then begin //resize layer 1 fLayer1Layout.Resize(self); //resize layer 2 header panel if Assigned(fLayer2HeaderLayout) then fLayer2HeaderLayout.Resize(fLayer1Header); //resize layer 2 footer panel if Assigned(fLayer2FooterLayout) then fLayer2FooterLayout.Resize(fLayer1Footer); //resize layer 2 main panel if Assigned(fLayer2MainLayout) then fLayer2MainLayout.Resize(fLayer1Main); end;
  7. IElite

    CladView

    The term "Clad" refers to newer change, worth only it's face value (as opposed to a "Coin", which may be worth more than its face value) Screenshot Demo The following code could be refactored in many ways, but it is a good demo for on how to use the Layout extensively. It also does not use any styling other than default Code
  8. COMFIED

    Locking Orientation to Portrait

    How can I lock a SmartMS app to display in portrait mode, irrespective of the device orientation?
×