FLTK logo

Re: [fltk.general] Fl_Hold_Browser

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Fl_Hold_Browser Paul Hahn Sep 10, 2020  
 
On Thursday, September 10, 2020 at 11:45:08 AM UTC-5 holm.h...@gmail.com wrote:
Here is a small program, where my problem is exposed. I use the Set_Font routine to recusively set font in my program.
Do anyone see the problem in my code ? The browser do not show all entries.

FYI I built and ran your program and see the same thing. My *guess* about the FLTK internals here is that changing font size does not cause a resize of the widget *nor* its child components -- in this case, the internal area that is scrolled. If so, then possibly a clumsy workaround ("kludge"?) for your application when changing font size, is to create and add a new instance of the browser with same X,Y,W,H and with new font size, then copy in the text lines from the old browser, the scroll to the old line, then show the new browser, then hide / delete the old browser, then call the parent container group's init_sizes() method. Occasionally I have to employ tricks like this when reconfiguring things in a UI.  Just part of programming life. But normally, I only manipulate font size in the other direction, ie. in *response* to resizes, rather than resizing in response to font size changes.

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/0f6c8c86-519a-47fc-9bfc-7380e5124eean%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.