I have spent a few days on this. I have a routine in our base form class that will resize the controls according to the DPI settings of the system. Since this happens in the form Init, the grid has already been initialized any centering of an object in a container in a grid column does not appear to display that way. I have used the DynamicCurrentControl property to call a method to be sure the image is centered. I have stepped through that code and see that it centers the image in the container. Once I release the break, visually the image is not centered in the container in the grid.
(note: DynamicCurrentControl is fired multiple times for each visible row in the grid when the data is changed) -----Original Message----- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Tracy Pearson Sent: Monday, March 08, 2021 5:41 PM To: profoxt...@leafe.com Subject: RE: Grid with an centered image Hi Frank, That's where I went first. We have a process that changes the font size used in the grid. I was attempting to base centering the image on the container based on the container size. The container size doesn't change with the rowheight of the grid. I didn't try an anchor. I may need to create a container base that holds the image control and the correct size and see what happens. I'll get back to you. Thank you, Tracy -----Original Message----- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Frank Cazabon Sent: Monday, March 08, 2021 5:26 PM To: profoxt...@leafe.com Subject: Re: Grid with an centered image How about trying it in a container? On 8 March 2021 16:28:12 GMT-04:00, Tracy Pearson <tr...@powerchurch.com> wrote: >Hello everyone, > >I am wanting to add an image to a column in a grid and it be centered. >Using the image control directly leaves the image in the upper left. (0 >- >Clip) >Allowing the image to grow causes pixilation. (1 - Isometric, 2 - >Stretch) > >I have placed the image in a button that this does the trick. >It adds another problem that needs to be taken care of. >The product uses the HighlightStyle 2 - Current row highlighting >enabled >with visual persistence. >The CommandButton doesn't have a setting to be transparent. > >What options might I have > to have the color come through around a centered image > to have the highlight color set as the background color of the button >for the current selected row > > >Thank you, >Tracy > > > >_______________________________________________ >Post Messages to: ProFox@leafe.com >Subscription Maintenance: >https://mail.leafe.com/mailman/listinfo/profox >OT-free version of this list: >https://mail.leafe.com/mailman/listinfo/profoxtech >Searchable Archive: https://leafe.com/archives >This message: >https://leafe.com/archives/byMID/001101d71459$8fdbcab0$af936010$@powerchurc h.com >** All postings, unless explicitly stated otherwise, are the opinions >of the author, and do not constitute legal or medical advice. This >statement is added to the messages for those lawyers who are too stupid >to see the obvious. > >Report [OT] Abuse: >http://leafe.com/reportAbuse/001101d71459$8fdbcab0$af936010$@powerchurch.co m -- Frank Cazabon Sent from my phone. Please excuse my brevity. --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- [excessive quoting removed by server] _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/005b01d71b7f$04636ba0$0d2a42e0$@powerchurch.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.