NetTalk Central

Author Topic: GetScreenSize  (Read 3622 times)

oggy

  • Full Member
  • ***
  • Posts: 219
    • View Profile
    • Email
GetScreenSize
« on: May 26, 2020, 02:52:35 AM »
Nettalk 11.36, I need to get form size,  after the form is created...
How?
Edited:
or even better, I recall that some controls can be sized according to percent,
like: 75%....
In this build this not working...

Thanks in advance
« Last Edit: May 26, 2020, 03:11:37 AM by oggy »

oggy

  • Full Member
  • ***
  • Posts: 219
    • View Profile
    • Email
Re: GetScreenSize - resolved
« Reply #1 on: May 26, 2020, 04:46:54 AM »
Found what I want:
in NetWebServerWorkerBase.CreateMapDiv  Procedure(String p_ID, <String p_Class>, <String p_Width>, <String p_Height>)
for my purpose i change the code from:

if instring('px',lower(p_width),1,1) or instring('pt',lower(p_width),1,1) or instring('em',lower(p_width),1,1) or instring('%',p_width,1,1)
      loc:style.SetValue('width:' & clip(p_width) & ';')
    else
      loc:style.SetValue('width:' & clip(p_width) & 'px;')
    end
to:
 if instring('px',lower(p_width),1,1)
            loc:style.SetValue('width:' & clip(p_width) & 'px;')
        END
       
        if instring('pt',lower(p_width),1,1)
            loc:style.SetValue('width:' & clip(p_width) & 'pt;')
        END
       
        if instring('em',lower(p_width),1,1)
            loc:style.SetValue('width:' & clip(p_width) & 'em;')
        END
        if instring('%',p_width,1,1)
            loc:style.SetValue('width:' & clip(p_width) & '%;')
        END
      and also for the height...