Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. fruNNik

    SAVE DATA TO FILE

    db192, It would help if you could clarify what problems you encounter. Do you have som code snippet and an error message? I Havent coded DB very much but may be able to help... Cheers - fruNNik
  2. fruNNik

    DBGRID and Colors

    use the DrawColumnCell to draw on the Grids Canvas, there you can place the if like so: procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState); begin // pseudo code if Value > 10 then...
  3. fruNNik

    Seperating out procedures.

    ...procedure !!! Or am i missing something ? Procedure C; begin Edit1.text := VariableC; end; Procedure A; begin //Blah Blah Blah VariableC := 6 * VariableB; // Run Procedure C: C; end; Procedure B; // ?edited begin //Blah Blah Blah VariableC := (3.5 * VariableB) + 5; // Run Procedure C...
  4. fruNNik

    check box in dbgrid

    Hi, DBGrid has a selectedrows property which is a TBookmarkList, and it has the functionality you describe... You can select records bij clicking the thumb (i think), when DBGrid.Options include: dgRowSelect and dgMultiSelect When the selected rows are needed you just walk the...
  5. fruNNik

    TStringGrid - OnStartEdit, OnStopEdit

    Maybe by using the OnGetEditText and SetEditText events of the Grid, you can get what you want ? SetEditText is called everytime the contents of the cell changes, and when you leave the edited cell, so you'd have to fiddle something there ... hth - fruNNik
  6. fruNNik

    How to create App.server

    Its not a real answer but, I have used the ADO components to connect to MSSql server. The setup is sort of the same you mentioned with a TADoConnection and TDatasource, which can be tables, queries or stored procs, and viewing components like TDBGrid etc. I dont know which Delphi version...
  7. fruNNik

    webbrowser problem

    Search on Google found: http://www.delphifaq.com/fq/q4053.shtml says: Msg 'Canvas does not allow drawing' Q: What does the error message 'Canvas does not allow drawing' mean? A: you may have run out of resources, which means a new DC cannot be allocated. Usually this is a result of not...
  8. fruNNik

    Draw Grid Question

    Oops (typo): procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState); var n: Integer; begin n := StrToIntDef(StringGrid1.Cells[ACol,ARow],-1); if n >= 0 then ImageList1.Draw(StringGrid1.Canvas,Rect.Left,Rect.Top,n)...
  9. fruNNik

    Draw Grid Question

    I would take a TStringGrid (to put the index of the picture to draw in), and make it owner drawn like this: procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState); var n: Integer; begin n :=...
  10. fruNNik

    Draw Grid Question

    Hmm i dont get it quite. What i showed you is how to display a pict in drawgrid. You need some structure or rules to determine when to display the image and which image to display. In the DrawGridCell YOU (as the programmer) have to decide IF you show a picture (or text for that matter) and...
  11. fruNNik

    a SaveToFile question

    Great it works! To use jpeg u need to include the unit jpeg... You probably need to convert the copybmp function to accept a TGraphic instead of a TBitmap ... dunno ? After i gave you my solution, the following occured to me: You could probably just use the Canvas.CopyRect function to do in...
  12. fruNNik

    a SaveToFile question

    try this to scale procedure copybmp(ASrc,ADst: TBitmap); var r,c: Integer; x,y: Integer; dx,dy: Real; begin (* it assumes dst is always smaller then src, and that both bitmaps have their dimensions set *) dx := ASrc.Width / ADst.Width; dy := ASrc.Height / ADst.height; for r := 0 to...
  13. fruNNik

    Draw Grid Question

    How about this: procedure TForm1.DrawGrid1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState); begin ImageList1.DrawDrawGrid1.Canvas,rect.Left,Rect.Top,0); end; ;) Cheers - fruNNik
  14. fruNNik

    Draw Grid Question

    I assume that when you say: an icon to be loaded, you mean an icon to be displayed ? In which case something like this will do the trick: procedure TForm1.DrawGrid1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState); begin if gdSelected in State then...
  15. fruNNik

    image

    Well, that should work (i think). Did you assign the field property of the DBImage to the Blobfield ? - fruNNik
  16. fruNNik

    putting an image on a tab sheet

    Let me get this clear first ;) Do you want to draw on the Tab or on the Page ? I thought what you wanted was an icon beside the (regular) text on the tabs of the PageControl - is that right ? - fruNNik
  17. fruNNik

    image

    I Guess you are using a dbgrid for viewing the dataset ?, that wont display the picture (without help). You need to display the image in a separate control. Catch the OnChange event of the Dataset and assign the data of the blobfield to an image. hth - fruNNik
  18. fruNNik

    image

    You use a TBlobField to assign the image to it: if not (Query1.State in [dsInsert, dsEdit]) then Query1.Insert; Query1Images.Assign(Image1.Picture.Bitmap); Query1.Post; where Query1Images is a TBlobField hth - fruNNik
  19. fruNNik

    image

    You have to to put it into a BLOB field, I dont know if Paradox supports it though... - fruNNik
  20. fruNNik

    putting an image on a tab sheet

    Ive tried it in D5 with this: procedure TForm1.PageControl1DrawTab(Control: TCustomTabControl; TabIndex: Integer; const Rect: TRect; Active: Boolean); begin PageControl1.Canvas.Draw(Rect.Left,Rect.Top,Image1.Picture.Graphic); end; which works, Have you set the Ownerdraw porperty of the...

Part and Inventory Search

Back
Top