Combo Box component in Delphi

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ธ.ค. 2024

ความคิดเห็น • 14

  • @mahmoudhassan6627
    @mahmoudhassan6627 ปีที่แล้ว +3

    Wonderful wonderful wonderful .. What a method you are following to teach !!! .. Incredible .Fantastic
    I owe you so much Mr. Long -
    Regards from Tripoli - Libya
    Your brother : Mahmoud Hassan

    • @MrLongITandCAT
      @MrLongITandCAT  ปีที่แล้ว

      I'm so glad the videos have helped!

  • @tshepisosiphokazimajola3575
    @tshepisosiphokazimajola3575 2 ปีที่แล้ว +1

    thank you this is so helpful

  • @dani-wi1ot
    @dani-wi1ot 5 หลายเดือนก่อน

    Pls I have a text file and I want some values on the text files to be shown on combobox ..any tips?

    • @MrLongITandCAT
      @MrLongITandCAT  5 หลายเดือนก่อน +1

      Loop through the text file and add the values to the combobox.
      var myfile: textfile ;
      sLine : string ;
      Begin
      AssignFile( myfile , 'textfile_name.txt' ) ;
      Reset( myfile ) ;
      while NOT eof( myfile ) do
      begin
      readln( myfile, sLine ) ;
      combobox1.Items.Add( sLine ) ;
      end;
      CloseFile( myfile ) ;

  • @AaronCrompton-h7i
    @AaronCrompton-h7i ปีที่แล้ว

    Hello, is there a way to make the user unable to type text and have the default item selected as 0 or would i have to use a different component?

  • @manjerolinu2121
    @manjerolinu2121 2 ปีที่แล้ว

    Hello. Thank you very much for the detailed explanation. But there is a problem that once selected the item is not reset and the last one remains selected. To overcome this problem
    cmbx.itemindexI=-1;
    cmbx.text:='Please select..';
    But that's more lines of code. How to write more concisely?

    • @MrLongITandCAT
      @MrLongITandCAT  2 ปีที่แล้ว +2

      Not sure what you are asking. You can check to see if an item is selected by using an if statement:
      if cmbx.ItemIndex = -1 then showmessage('Please select')
      else
      begin
      //do code here for selected item

  • @daveeeeeeeeeeeeeeeeeeeeeeeeeee
    @daveeeeeeeeeeeeeeeeeeeeeeeeeee 2 ปีที่แล้ว +1

    How do you insert multiple options

  • @M.M628
    @M.M628 2 หลายเดือนก่อน

    Hello , I have a question for my pat. I want to use the data from a combobox on Form1 on another combobox in Form2. Can someone please help me?

    • @MrLongITandCAT
      @MrLongITandCAT  2 หลายเดือนก่อน +1

      At the top of form2 you must add the file name of form1 (Unit1 or whatever its name is) under uses. Then you should be able to type sValue := Form1.comboxbox1.value
      If that doesnt work then try then name of the unit file of form 1
      sValue := Unit1.comboxbox1.value

    • @M.M628
      @M.M628 2 หลายเดือนก่อน +1

      @@MrLongITandCAT thank you!