Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
7
Erster Beitrag:
vor 3 Jahren
Letzter Beitrag:
vor 3 Jahren
Beteiligte Autoren:
Sascha77, Alexandre Leclerc

[WD19] combo box - how to pass a parameter to the popup window [SOLVED]

Startbeitrag von Sascha77 am 25.02.2015 10:55

Greetings,

another day another challange.

The problem I am facing currently is, that I don´t know how to pass a parameter to the popup window I have selected for a combobox.

i have tried a workaround, by opening that window in the "openening drop down list" process but i could not avoid expanding the list .... Is there a way not to expand the list or to close it imidiatly?


Thanks
Sascha

Antworten:

Re: [WD19] combo box - how to pass a parameter to the popup window

Hi Sascha,

This is the good way to do it. In a nutshell:
- In the Description of the combo, the "Content" tab, select "Popup window" and the popup window to use.
- Use the Opening drop down list even to OpenPopup() the popup window with the desired parameters.
- Because you will use OpenPopup() the dropdown will not open.

Best regards,
Alexandre Leclerc

von Alexandre Leclerc - am 25.02.2015 13:21

Re: [WD19] combo box - how to pass a parameter to the popup window

Hi Alexandre,

this works fine. thanks!


but now i have another issue;

The binding source for my combobox is an array - it´s showing the description and its storing the unique ID. Selecting and storing the data works fine, but when I reopen the record, the display value is empty for both option ( Normal dropbox and popup window ) but it works if I am using a Table for the combo????


any idias?

Thanks
Sascha

von Sascha77 - am 26.02.2015 05:59

Re: [WD19] combo box - how to pass a parameter to the popup window

Hi Sascha,

Usually this kind of problems appears when you do not load the "data source" of the combo before data is assigned to it.

Bad exemple:
COMBO = Value
COMBO..Content = sContent
// Results in empty value

Good exemple:
COMBO..Content = sContent
COMBO = Value
// Results in good value

This is very simplistic, but this is it. Make sure your SourceToScreen() (or the like) is called after your combo has it's possible values loaded properly.

Best regards,
Alexandre Leclerc

Edit 1: Many typo corrections.

von Alexandre Leclerc - am 26.02.2015 13:29

Re: [WD19] combo box - how to pass a parameter to the popup window

HI Alexandre,

I am initalizing all my combox Arrays before I do the SourceToScreen...however it works fine when I do select "Table" as my ExpandType for the combobox.

Cheers,
Sascha

von Sascha77 - am 26.02.2015 14:03

Re: [WD19] combo box - how to pass a parameter to the popup window

Hi Sascha,

Check the gLink option and make sure all is correct. (Value stored, value displayed, what is assigned, etc.) There is a little detail somewhere.

Best regards,
Alexandre Leclerc

von Alexandre Leclerc - am 26.02.2015 15:53

Re: [WD19] combo box - how to pass a parameter to the popup window

Hi Alexandre,

finally I found the issue...


I am heavily using internal windows und ChangeSourceWindow() function.

I figured out that the setup of my combobox was working just fine on a normal window. Next I assign an internal window with a combobox directly on a window and it was also working fine.

The problem is the dynamic change of the internal window by using ChangeSourceWindow() function.

The trick now is to call SourceToScreen() right after calling ChangeSourceWindow()

Thanks again for your help.

Cheers,
Sascha

von Sascha77 - am 26.02.2015 20:31
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.