cdev Posted April 16, 2021 Share Posted April 16, 2021 Hi, I made a fine looking layout on my big high resolution screen. But when displayed on a 13 or 11 inch screen, I loose whole parts of my layout. I found the custommeta property in servermodule and the desktopviewport properties in the mainmodule, but I don't know what exactly I have to do to 'scale' my application to the client screen. Can anyone help me as to this matter ? Quote Link to comment Share on other sites More sharing options...
Wilton Ergon Posted April 17, 2021 Share Posted April 17, 2021 see this https://radcore.pro.br/ Quote Link to comment Share on other sites More sharing options...
x11 Posted April 18, 2021 Share Posted April 18, 2021 try use uniAlignmentClient and do not use align 1 Quote Link to comment Share on other sites More sharing options...
mikromundo Posted April 20, 2021 Share Posted April 20, 2021 Quote Link to comment Share on other sites More sharing options...
Pier Posted April 23, 2021 Share Posted April 23, 2021 What do you want to achieve exactly? In my case Everything lives in frames which are created at runtime and I change their size when the browser window changes size with: procedure TMainForm.UniFormAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); var i,j:integer; tabSheet:TUniTabSheet; begin if SameText(EventName, 'resize') then begin for i := 0 to UniPageControl1.PageCount-1 do begin tabsheet:=UniPageControl1.Pages[i]; for j := 0 to tabsheet.ControlCount-1 do begin if tabsheet.Controls[j] is TUniFrame then begin (tabsheet.Controls[j] as TUniFrame).Width:=tabsheet.Width; (tabsheet.Controls[j] as TUniFrame).Height:=tabsheet.Height; end; end; end; end; end; ...but maybe your scenario is different Quote Link to comment Share on other sites More sharing options...
cdev Posted April 25, 2021 Author Share Posted April 25, 2021 I am working with Client Alignment. For example I have this screen, layout made on a 1920x1080 monitor : (Let us suppose this is good, this is how I want my page to look) But when I display this on a bigger screen, I get this : On a 4K-screen : Or even on a small screen : With these examples, you will surely understand what I mean. What I would like to have is more or less the same look as on the first screen. That the elements on the page are proportionally resized (stretched or shrunk) depending on the screen display. (Something similar as the stretch property of an image, but here for all elements on the page: image, label, panel, ...) If we focus on the text, on the first screen the size of the font is 16: this looks good. But on bigger screens or screens with a higher resolution, the font size should be higher, on smaller screens or lower resolution: the font size should be less. Is there a way to achieve this ? I guess this is also a hint for all developers: your application can look quite good on your monitor, but nowadays people work with small 11-inch screens as well as huge 4K-screens. Your application can look quite different and even completely unwanted as in my last screenshot, where even my text is not fully displayed. Quote Link to comment Share on other sites More sharing options...
mikromundo Posted April 27, 2021 Share Posted April 27, 2021 One of the benefits of RadCORE is the dynamic responsive settings that I created that can be extended very easily and create "new usage situations". I can "ask RadCORE" to adjust my components according to the device x resolution. We can reduce / expand according to the resolution or the content of the container. We can hide on a certain device. Adjust font size ... - Dynamic alignment : It is possible to "link" one object to another to dynamically adjust its positioning, centering, scale, etc. We can "interact" with uniDBGRID and also apply responsive features such as hiding or setting the width of a column in a given situation and still apply masks or "conditional" css classes to the field content without using a "field editor". RadCORE is constantly evolving by listening to users and applying improvements and new features every month. I always thank Farshad for creating UNIGUI. And what I do with RadCORE is to increase (in the simplest way) the firepower of the unigui. Much still to be done !!! But the results are these: - Responsiveness with default components ( or third party ) for any device - THEME CONTROL - TRANSLATION 1 Quote Link to comment Share on other sites More sharing options...
mikromundo Posted April 27, 2021 Share Posted April 27, 2021 @cdev I tried to reproduce with RadCORE the model you posted. Sorry about my bad English. 1 Quote Link to comment Share on other sites More sharing options...
irigsoft Posted April 29, 2021 Share Posted April 29, 2021 Hi, I don't know if this will help you, but I'm using this for myself: procedure SetFormSize (SelForm : TUniForm); var ClientWidth, ClientHeight : Integer; begin SelForm.Left := 0; SelForm.Top := 0; //Get Screen Size ClientWidth := UniSession.UniApplication.ScreenWidth; ClientHeight := UniSession.UniApplication.ScreenHeight; //Set Data SelForm.Width := ClientWidth; SelForm.Height := ClientHeight; {if (uniMainModule.AppPlatform <> [upDesktop]) AND (AnsiUpperCase (UniServerModule.SistemSettingsList.Values ['useAndroidPOS']) <> 'TRUE') then begin SelForm.WindowState := wsNormal; SelForm.Left := 0; SelForm.Top := 0; ClientWidth := UniSession.UniApplication.ScreenWidth; ClientHeight := UniSession.UniApplication.ScreenHeight; if UniSession.FormsList.Count <= 1 then exit; if (ClientWidth < FormMinWidth) then ClientWidth := TUniForm (UniSession.FormsList [UniSession.FormsList.Count - 1]).Width; if (ClientHeight < FormMinHeight) then ClientHeight := TUniForm (UniSession.FormsList [UniSession.FormsList.Count - 1]).Height; if ClientWidth < FormMinWidth then ClientWidth := FormMinWidth; if ClientHeight < FormMinHeight then ClientHeight := FormMinHeight; if ClientWidth < SelForm.Width then ClientWidth := SelForm.Width; if ClientHeight < SelForm.Height then ClientHeight := SelForm.Height; SelForm.Width := ClientWidth; SelForm.Height := ClientHeight; end; } SelForm.Repaint;//Set MainForm Size form_general.Left := 0; form_general.Top := 0; form_general.Width := SelForm.Width; form_general.Height := SelForm.Height; form_general.Invalidate; //Set Top form size TUniForm (UniSession.FormsList [UniSession.FormsList.Count - 1]).Height := SelForm.Height; TUniForm (UniSession.FormsList [UniSession.FormsList.Count - 1]).Width := SelForm.Width; TUniForm (UniSession.FormsList [UniSession.FormsList.Count - 1]).Invalidate; end; procedure TForm_General.UniFormAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin //activate resize forms if EventName = 'resize' then begin SetFormSize (Self); end; end; Quote Link to comment Share on other sites More sharing options...
Stemon63 Posted April 30, 2021 Share Posted April 30, 2021 On 4/27/2021 at 10:04 PM, mikromundo said: @cdev I tried to reproduce with RadCORE the model you posted. Sorry about my bad English. Hi Micromundo, it's time to ask Farshad for a "dedicate" property like "CustomProp" or similar in every Unigui components. You cannot continue to abuse with Hint property! :-) :-) Good job! Quote Link to comment Share on other sites More sharing options...
mikromundo Posted May 1, 2021 Share Posted May 1, 2021 Thanks for the feedback. Farshad has already started adding CustomAttributes. But there is no problem with using hint. - It does not affect the execution of the application; - It is almost unlimited, in the point of view that I use; - It exists in vcl, fmx etc; This all makes possible what I wanted from the beginning: You don't need anything special (new components) to have excellent results and a virtually unlimited expansion of new features. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.