"Samuel Liddicott" wrote:
...
Show quoted text 9 lines
(provide
Show quoted text 8 lines
No. GtkWidget cannot have child controls. The GtkContainer can, and most widgets and derived from GtkContainer.
...
> This OwnerDraw stuff as I see it now is the most likely candidate to be > incompatible with WinDelphi. We can make it work! We may have to do a ReCreateWnd and make a generic
GTK
window if it is ownerdraw and then err.... draw by hand. No probs!
(Except
of course TListBoxStrings will be implemented slightly differently to cope for the fact when there is no gtkListBox)
I thought about that, and will try that approach in near future. I have to test Shane's implementation of TCanvas first, and few other things, because in OnDraw event (OnOwnerDraw ?), you pass not the TCanvas, but TWinControl, and a rectangle. Unlike Win32 listbox, which has one big canvas for all of its lines, the GtkListBox approach (which I find cool :-) is that for each line (item) it contains another container, GtkItem, and this another container (descendant of GtkContainer, GtkBin - designed to hold just one child), may or may not hold a GtkLabel (which provides Canvas). The label holds and paints the text.
This OwnerDrawing would require to create an arbitrary control on the fly, and put it instead of the GtkLabel, which is not a problem. The problem is in the structure of the OwnerDraw event, which would point to different rectangles, but that need not be a problem, too.
Your approach, to create one big control with one canvas might also be a solution, but then a complete selection and focus management would have to be reprogrammed for TListBox :-(
Show quoted text 5 lines
No, only GtkContainer, which is a descendant of GtkWidget.
Michal Bukovjan
____________________________________________________________________ Get your own FREE, personal Netscape WebMail account today at http://webmail.netscape.com.
