Thread View: borland.public.cppbuilder.nativeapi
2 messages
2 total messages
Started by Rusty
Tue, 22 Apr 2003 20:40
OnHint Event Question
Author: Rusty
Date: Tue, 22 Apr 2003 20:40
Date: Tue, 22 Apr 2003 20:40
34 lines
2301 bytes
2301 bytes
Greetings: I have a form that contains child forms (not MDI) that have the FormStyle, fsStayOnTop. In one of those child forms, I have a TPageControl object. At runtime, I add TTabSheet objects as needed, and, in each TTabSheet object, I add a TListView object. The problem that I'm having is that whenever the TApplication's OnHint event fires that is triggered for one of the TListView objects, the hint appears on the MainForm, not over the TListView object (or even over the window that contains the PageControl). Any ideas as to what I'm doing wrong? Here is the code I am using to add TTabSheet and TListView objects: sheet = new TTabSheet( this ); sheet->Name = "TabSheet" + IntToStr( i ); sheet->PageControl = PageControl; sheet->Caption = curTable->Name; view = new TListView( this ); view->Name = "ListView" + IntToStr( i ); view->ShowHint = true; view->DoubleBuffered = true; view->Parent = sheet; view->ViewStyle = vsReport; view->Align = alClient; view->GridLines = true; view->Columns->Add( ); view->Column[ 0 ]->Caption = "String ID"; view->Column[ 0 ]->Width = view->Canvas->TextWidth( "String ID" ) + 8; view->Columns->Add( ); view->Column[ 1 ]->Caption = "Value"; view->Column[ 1 ]->Width = view->Canvas->TextWidth( "Value" ) + 8; All the Best, Rusty
Re: OnHint Event Question
Author: StarCinema
Date: Sun, 27 Apr 2003 14:52
Date: Sun, 27 Apr 2003 14:52
51 lines
2784 bytes
2784 bytes
You could try to use a method that I developed called The Component Method You'll find an example here http://www.geocities.com/rodolfofrino/HintsTheComponentMethod.html You can specify the parent of the Hint, so that the hint will appear exactly where you want Rodolfo StarCinema mediaplayer http://members.optusnet.com.au/~rodolfofrino/ StarGate "Rusty" <rustyr@redstorm.com> wrote in message news:3ea5a8d3$1@newsgroups.borland.com... > Greetings: > > I have a form that contains child forms (not MDI) that have the FormStyle, > fsStayOnTop. In one of those child forms, I have a TPageControl object. > At runtime, I add TTabSheet objects as needed, and, in each TTabSheet > object, I add a TListView object. The problem that I'm having is that > whenever the TApplication's OnHint event fires that is triggered for one of > the TListView objects, the hint appears on the MainForm, not over the > TListView object (or even over the window that contains the PageControl). > Any ideas as to what I'm doing wrong? > > Here is the code I am using to add TTabSheet and TListView objects: > > sheet = new TTabSheet( this ); > sheet->Name = "TabSheet" + IntToStr( i ); > sheet->PageControl = PageControl; > sheet->Caption = curTable->Name; > view = new TListView( this ); > view->Name = "ListView" + IntToStr( i ); > view->ShowHint = true; > view->DoubleBuffered = true; > view->Parent = sheet; > view->ViewStyle = vsReport; > view->Align = alClient; > view->GridLines = true; > view->Columns->Add( ); > view->Column[ 0 ]->Caption = "String ID"; > view->Column[ 0 ]->Width = view->Canvas->TextWidth( "String ID" ) + 8; > view->Columns->Add( ); > view->Column[ 1 ]->Caption = "Value"; > view->Column[ 1 ]->Width = view->Canvas->TextWidth( "Value" ) + 8; > > All the Best, > Rusty > >
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads