- This topic has 15 replies, 2 voices, and was last updated 4 years, 1 month ago by
Support.
-
AuthorPosts
-
November 24, 2021 at 2:29 pm #70526
Hello! Could you upload a full project, please?
December 3, 2021 at 9:33 am #70556Please find attached herewith my project. My sComboBox1 items will be as follows:
A. Fox
B. Tiger
C. Elephant
Any how I have coded my requirement in sComboBox1 but unable to get my required result as I mentioned above. Please help to rectify.But no option for HTML Coded PopupMenu Items. So you are requested to design your own PopupMenu.
Attachments:
You must be logged in to view attached files.December 4, 2021 at 7:06 am #70574Thank you.
Try this code in the OnGetItemDrawData:procedure TForm1.sComboBox1GetItemDrawData(Sender: TObject; var ItemDrawData: TacItemDrawData); begin ItemDrawData.HtmlText := ItemDrawData.Text; // Copy text for a current Item ItemDrawData.Text := ''; // Use HtmlText end;This event is called for an each Item and text should be different for each Item.
By the way, ‘Cyan’ color is not handled. Main 16 colors are added for parsing.
You can use a number format for colors there.December 4, 2021 at 10:31 am #70576Thanks for your code. Now sComboBox works perfectly. But PopupMenu Items customization remaining. Please launch your own PopupMenu.
December 5, 2021 at 8:05 am #70589Now another problem has come to me. When I am selecting any item in ComboBox it shows HTML Coded Text for example for
sComboBox1.Items[0]it shows<b><font color=Yellow>A.</font></b><font color=Red> Fox</font>instead of A. Fox[/color]. But your ComboBox Demo is OK. I am trying to find it out what you have coded more but unable to find. Please mention.-
This reply was modified 4 years, 3 months ago by
Koushik Halder.
December 8, 2021 at 8:55 am #70601Maybe you can upload another demo?
December 8, 2021 at 10:02 am #70602Please find my project attached herewith.
Attachments:
You must be logged in to view attached files.December 10, 2021 at 7:07 pm #70612I have updated my project.
Attachments:
You must be logged in to view attached files.December 12, 2021 at 8:15 am #70615Thank you, I’ll check it soon.
December 23, 2021 at 5:48 am #70661Please do the needful.
January 3, 2022 at 7:12 am #70671Look, the Text property receives html tags from the Items list, when selected.
We should think how to avoid this standard behavior…
Maybe new property like ‘MakeTextPlain’ will help?January 3, 2022 at 12:16 pm #70678Yes! Please implement it.
January 8, 2022 at 8:06 am #70694Thank you! I have checked and it is working fine.
January 10, 2022 at 10:29 am #70701MakeTextPlainis working partially. If anyComboBox ItemIndexis other than -1 i.e any item is selected then if I click any component likeButton,EditandMemoetc. then selected Item ofComboBoxagain becomesHTML RAW DATAnot the plain text.January 12, 2022 at 8:06 am #70707Hi! I will check it.
-
This reply was modified 4 years, 3 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.