Results 1 to 11 of 11

Thread: Corona Beer, Need more Delphi 7 help

  1. #1

    Thread Starter
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253

    Thumbs up Corona Beer, Need more Delphi 7 help

    I must be annoying you by now, all other members think so

    Anyway, here are a few more questions, if you dont mind helping:

    How do i limit a Textbox to Numbers only?

    How do i limit a Textbox to Words only?

    How do i limit a Textbox to Symbols only?

    How do i create a MRU list in a standard Delphi menu?

    Have you seen in Wordpad, if you move your mouse over the File > New menus etc it shows a hint in the statusbar. How would i go about doing the same thing?

    How do you change the caption in a MessageDlg?

    And whats wrong with this? It doesnt align my text:

    Code:
    procedure TfrmMain.mnuFormatAlignLeftClick(Sender: TObject);
    begin
    mnuFormatAlignCenter.Checked:= False;
    mnuFormatAlignRight.Checked:= False;
    txtMain.Alignment:= taLeftJustify
    end;
    
    procedure TfrmMain.mnuFormatAlignCenterClick(Sender: TObject);
    begin
    mnuFormatAlignLeft.Checked:= False;
    mnuFormatAlignRight.Checked:= False;
    txtMain.Alignment:= taCenter
    
    end;
    
    procedure TfrmMain.mnuFormatAlignRightClick(Sender: TObject);
    begin
    mnuFormatAlignLeft.Checked:= False;
    mnuFormatAlignCenter.Checked:= False;
    txtMain.Alignment:= taRightJustify
    
    end;
    THANK YOU MATE!
    Last edited by Madboy; Jun 1st, 2004 at 06:40 AM.

  2. #2
    Lively Member CORONA BEER's Avatar
    Join Date
    May 2004
    Location
    THE INTERNETS!
    Posts
    82

    Re: Corona Beer, Need more Delphi 7 help

    Originally posted by Madboy
    [B]
    Have you seen in Wordpad, if you move your mouse over the File > New menus etc it shows a hint in the statusbar. How would i go about doing the same thing?

    How do you change the caption in a MessageDlg?
    I thought the was a Mouse over event for a TMenuItem
    then you could have your status bar display a hint for that event ,
    but there aint one so i dunno You should check out experts-exchange.com the people knlow more delphi than i do ask them how to validate a textbox.

  3. #3

    Thread Starter
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    ok cheers

  4. #4
    pathfinder NotLKH's Avatar
    Join Date
    Apr 2001
    Posts
    2,397

    Re: Re: Corona Beer, Need more Delphi 7 help

    Originally posted by CORONA BEER
    You should check out experts-exchange.com the people knlow more delphi than i do
    WooHoo!

    Does this mean we won't have any more Delphi Posts in Chit Chat?

    :crossesfingers:


    -Lou

  5. #5
    Lively Member CORONA BEER's Avatar
    Join Date
    May 2004
    Location
    THE INTERNETS!
    Posts
    82
    Originally posted by NotLKH
    [B]WooHoo!
    Does this mean we won't have any more Delphi Posts in Chit Chat?
    When all else fails ask the experts, I hope we can get a delphi sub forum soon, Madboy : i think you asked me how long i have been writing in delphi, A little over a year bro,
    and i'm using Delphi 6.

  6. #6

    Thread Starter
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    NotLKH, this is a developer forum, like it or lump it, least my threads have meaning.

    Corona, i didnt sign up at Experts-exchange, instead i found this huge page of tips, leading to code and examples. The list is endless, it has answered many questions i need in a second. See for yourself dude:

    http://xdds.nepro.net/~cho/3kdt/inde...gcolor=#EED24F

  7. #7
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906
    Originally posted by Madboy
    least my threads have meaning.
    This is Chit Chat. Threads with meaning look out of place in Chit Chat
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  8. #8

    Thread Starter
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Where else can i post? If you are all so worried/bothered of my out of place, not so off-topic threads. I say get on to marty for a Delphi forum, everyone is happy then

    Ok Corona, 2 questions im sure you can help with

    Whats the correct way to unload all forms from memory and close them? In VB it is done like:

    VB Code:
    1. Dim frm As Form
    2.    For each frm In Forms
    3.       Unload frm
    4.    Next frm

    And finally. I worked out the menu hints thing. I have the code shown below, which works great. Only problem is. is when i mouseover my toolbar buttons, the hints shown from there are placed in the Statusbar too. Appreciate it if you know how to stop the toolbar hints being shown in the statusbar:

    Code:
    private
        procedure HintHandler(Sender: TObject);
    
    procedure TfrmMain.FormCreate(Sender: TObject);
    begin
      mnuFileNew.Hint:= 'Creates a new document';
      mnuFileOpen.Hint:= 'Opens a file from your computer';
      mnuFileSave.Hint:= 'Saves the current document to file';
      mnuFilePrint.Hint:= 'Sends the document to the printer';
      Application.OnHint := HintHandler;
    end;
    
    procedure TfrmMain.HintHandler(Sender: TObject);
    begin
      stsMain.Panels[0].Text:= Application.Hint;
    end;
    Cheers

  9. #9
    Lively Member CORONA BEER's Avatar
    Join Date
    May 2004
    Location
    THE INTERNETS!
    Posts
    82
    Whats the correct way to unload all forms from memory and close them? In VB it is done like:

    VB Code:
    1. Dim frm As Form
    2.    For each frm In Forms
    3.       Unload frm
    4.    Next frm

    [/QUOTE]
    You mean unload all of your child forms

    VB Code:
    1. procedure TfrmMain.FileCloseAllClick(Sender: TObject);
    2. var
    3.   i: integer;
    4. begin
    5.   //close all child windows
    6.   for i:= 0 to MDIChildCount - 1 do
    7.     MDIChildren[i].Close;
    8. end;

  10. #10

    Thread Starter
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Cheers, im not making that editor thing now, cant be assed

    Im just trying loads of controls, in comparison to VB, Delphi 7 looks down on VB. It even lets you edit Treeview nodes at design time simply, and lets you assign icons to them with ease

    I do however have one more question Here goes anyway.

    I cant get this IF statement to work, care to shed any light mate?

    Code:
    procedure TfrmMain.mnuViewCategoriesClick(Sender: TObject);
    begin
      if mnuViewCategories.Checked = True then
        tvwmain.Visible:= True;
        splitterMain.Visible:= True
      else if mnuViewCategories.Checked = False then
        tvwmain.Visible:= False;
        splitterMain.Visible:= False
      end
    end;
    
    end.
    Cheers

  11. #11

    Thread Starter
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Sussed it finally

    Code:
    procedure TfrmMain.mnuViewCategoriesClick(Sender: TObject);
    begin
      if mnuViewCategories.Checked = True then
        begin
          splittermain.Visible:= True;
          tvwmain.Visible:= True
        end
      else if mnuViewCategories.Checked = False then
        begin
          splittermain.Visible:= False;
          tvwmain.Visible:= False
        end
    end;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width