Image size question

I’ve inherited an app - utilizing GoDiagram. They are setting screen size based on the screen resolution - OK for full screen - not so well for users who resize their screen.

Is there a quick easy fix that will be based on current window size? Longer term I’ll have to deal with this plus the ability to re-size (which I’m, sure is in the documentation that I’m starting to read!!)

        'set the height and width based on user resolution

        intHeight = CType(context.Items.Item(Common.WebKeys.GO_VIEW_HEIGHT), Integer)
        intWidth = CType(context.Items.Item(Common.WebKeys.GO_VIEW_WIDTH), Integer)

        Select Case intHeight
            Case 600
                IconicView.Height = Unit.Pixel(400)
                LegendView.Height = Unit.Pixel(400)
            Case 768
                IconicView.Height = Unit.Pixel(392)
                LegendView.Height = Unit.Pixel(392)
        End Select

        Select Case intWidth
            Case 800
                IconicView.Width = Unit.Pixel(550)
            Case 1024
                IconicView.Width = Unit.Pixel(680)
        End Select

The application is changing the size of the screen??? That’s highly unusual. Users ought to be able to choose the screen size, based on the terminal capabilities and personal preferences.

By default GoView.DocScale = 1, meaning one document unit is equal to one pixel.
By default a GoImage, when it gets a new image, resizes itself to be the natural size of its Image. You can set GoImage.AutoResizes to false in order to prevent that automatic resizing when the Image changes.

the application is not changin the size of the screen - rather the image is drawn to a frame based off of the users full screen resolution. So if the screen resolution is 1024 by 768 - the image is drawn at 680 by 392. (the frame is set to that size). Which works ok if the user web page is set to full screen - but if they are something different, less than full screen the frame can go beyond the web page

There is also no provision to resize if the user changes the page size

Then I guess I don’t understand what you want.

Well , this statememt

intHeight = CType(context.Items.Item(Common.WebKeys.GO_VIEW_HEIGHT), Integer)
intWidth = CType(context.Items.Item(Common.WebKeys.GO_VIEW_WIDTH), Integer)

is setting width and height to the screen resolution values - ie 1024,768. Can we instead set height,width to the current web page size? (make sense?)

Oh, so you just want to change the size of the GoView based on the size of the browser window?

The Classier sample demonstrates widening the window if more width is available. Basically, you just need to call the JavaScript function goSize to set the GoView size on the server.

perfect - thanks!!