> my question is say i have text editor component with size of
> h = 30
> w = 40
> and im wrap mode with scrolls disabled, how can i detect when i
> typing text its reaching to the end of the size defined that is
> h = 30 then it will stop me from typing .


You will need to use fl_measure() in your callback to work out the
width of the text in pixels and take action appropriately.

Greg's Cheat Sheet has an example of using fl_measure in a different
context, but is should be enough to get you going:
http://seriss.com/people/erco/fltk/#StrikeThrough

Also the rotated_text.cxx example in the fltk-1.3/src/test directory.

Cheers
Duncan
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to