Jump to content

Delphigui

uniGUI Subscriber
  • Posts

    10
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Delphigui's Achievements

Newbie

Newbie (1/4)

0

Reputation

  1. On my configuration : Images is located in C:\ TestCB is located in D:\Projets Delphi\ What to say more, I've Delphi Sydney 10.4.2 and uniGui 1.90.0.1555 on a Windows 10 Professional 21H2 64 bits Thanks for your availability and your investment to solve my problem. Images.7z TestCB.7z
  2. I just went to finish the test and unfortunately it's the same, it doesn't work! But I can share you the project (simple test case)? Thanks for the help and to not giving up 🙂
  3. Yes you're right like every combo in Delphi and the same for TUniComboBox apparently.
  4. Unfortunately it doesn't work. Another point strange : I have 3 items in the combo By defaut the second is selected with itemindex to 1 I use JSAssign('getStore().data.items[1].data.icon.iconUrl', ['files/English.bmp']); to put an icon only for the second item If I select the third and some seconds later back to the second the icon of the second is not copied to the "selected zone" So it appears that with your line of code we are able to properly set an icon for each item of the list of the combo but it seems to be separated of the mechanism which manage the icon of the selected item Here is an illustration on the example.png : As you can see in the selected zone there is a blank icon at the left of the text If I chose French (with the wrong flag I know it's just for test), he will write French in the selected zone but the icon will stay blank in place of the union jack flag. Perhaps it's normal because it's not normal behaviour? Thanks again for your help really appreciated.
  5. In a TUniButton like that : with cmbTest.JSInterface do begin JSAssign('getStore().data.items[1].data.icon.iconUrl', ['files/English.bmp']); JSCall('fireEvent', ['change']); end; The itemIndex of the combo is 1 by default
  6. Hi Sherzod, Thank you very much for your reply. That works smoothly for the different items inside the combo but not for the one selected (even with the line "JSCall('fireEvent', ['change']);"). The icon stay blank. But thanks a lot it's a progress because now I'm able to put icon for each item 🙂 Do you have another clue perhaps? Thanks again for your help 🙏
  7. Hi the forum, I'm always in the dark. I'm thinking to another approach. Is there possible to load the different icons corresponding to the the different items (plus the one selected) of the UniComboBox dynamically (once the combo is populated) with the assistance of the ClientEvents property (ExtEvents or UniEvents) ? For the moment I've the following process : Inside the MainModule, I've a TUniNativeImageList which is filled dynamically during the UniGUIMainModuleCreate event with the assistance of AddImageFile to add differents bmp of 20 x 20 Inside a TUniForm during the UniFormCreate event I have this : unicombobox.Images := UniMainModule.UniNativeImageListCommune; And here the code to loop every country to fill the combo like in the first discussion of this topic. When I compile my project on the partition D:\ it seems to works but when I move the executable to C:\ it doesn't worked anymore but the location for the BMP is on C:\for both attempts. For now, I saw that the folder created automatically by the executable during is launch in D:\ and C:\ is not totally the same. The one on D:\has more resources than C:\ which could explain that it works for D:\ and not for C:\ ? Moreover I saw that inside the folder which is created automatically there is a sub folder titled "files" (where I can imagine to copy my BMP), so it's why I'm wondering if I could replace the blank icons of the combo, after the combo is rendered, directly in the JavaScript code? Thanks in advance for the help.
  8. Hi the forum, I've a little bit progressed on my problem. In fact that works only if you put the piece of code inside the "OnCreate" event. The problem now is if you need to change or clean and refill the combobx during the use of the application. In this case it doesn't work! Is there somebody able to help me? Any help much appreciated. Good afternoon to everybody.
  9. Hi Everybody, I tried to contact the support but I'm not sure of the mail so I'm here. I'm not sure too of the right section of the Forum? I met some problems when I use the combobox with imagelist by code (but manually at design time that works) I proceed like that : I put on a form a unicombobox, unibutton, and uniImagelist ont the button event I'm writing this: unicombobox.Images := UniImageList1; intCompteur := 0; for strLangue in stlListe do begin with (unicombobox.IconItems.Add) do begin Caption := strLangue; ImageIndex := intCompteur; end; Inc(intCompteur); end; I compile and launch the project But when the browser displays the form the combobox is displaying the 3 items (Choose a language ..., French, English) but without icons. If I do the same thing at design time by affecting imagelist directly on the component and filling iconitems property manually, I recompile and launch that works! But I need to run this dynamically, so I'm blocked! Someone as an idea to help me? Just a last precision, I use Delphi Sydney 10.4.2 with unigui components 1.90.0.1555. Also tried uninstallation of components, cleaning and fresh install but unfortunately not better. Thanks in advance for the attention you will give to my post and for your assistance.
×
×
  • Create New...