Autore Topic: Mantenere l'aspetto originale di un'immagine anche con la dilatazione della PBox  (Letto 242 volte)

Offline vuott

  • Moderatore globale
  • Senatore Gambero
  • *****
  • Post: 11.269
  • Ne mors quidem nos iunget
    • Mostra profilo
Riporto questa discussione apparsa nella M.L. ufficiale:

" I have a picturebox within a vsplit which is in turn inside a hsplit.

The gist of what I need is to control the stretch so that the original
aspect ratio of the picture is maintained no matter which splitter they
expand/reduce.

Bruce
"


" I can't think of any built-in way to do that. However, you could at least
replace the PictureBox by a DrawingArea and do the stretching manually in
DrawingArea_Draw(). I have attached a simple project to show how it could be done.
(vedi allegato)


Regards,
Tobi
"
« Chiunque, non ricorrendo lo stato di necessità, nel proprio progetto Gambas fa uso delle istruzioni Shell o Exec, è punito con la sanzione pecuniaria da euro 20,00 a euro 60,00. »