#PRIM_LIST.DropDown Text property (SOLVED)

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
Taku Izumi
Posts: 63
Joined: Thu Dec 15, 2016 2:03 pm

#PRIM_LIST.DropDown Text property (SOLVED)

Post by Taku Izumi »

Hi,

Is there a way to set the initial value to the Text property of #PRIM_LIST.DropDown?
I know how to insert a value into #PRIM_LIST.DropDown using the Add_entry command, but that's not what I want to do.
What I want to do is not include the value in #PRIM_LIST.DropDown but display it only in the Text property.
スクリーンショット 2024-02-21 094710.png
スクリーンショット 2024-02-21 094710.png (5.79 KiB) Viewed 16013 times
Best regards,
Taku
Taku Izumi
Posts: 63
Joined: Thu Dec 15, 2016 2:03 pm

Re: #PRIM_LIST.DropDown Text property (SOLVED)

Post by Taku Izumi »

I was able to solve this by setting a value to the data class component of the #PRIM_LIST.DropDown.
This is the sample code.

Code: Select all

Begin_Com Role(*EXTENDS #PRIM_WEB) Theme(#SYS_THEME<MaterialDesignBlue>) Height(256) Width(728)

* DataClass is #STD_NUM
Define_Com Class(#PRIM_LIST.DropDown) Name(#DropDown1) Columnheaderheight(0) Columnlines(False) Displayposition(1) Left(48) Parent(#COM_OWNER) Rowlines(False) Showselection(False) Tabposition(1) Top(40) Height(23) Dropdownstyle(DropDown) Autoselect(False) Autoselectitem(False) Width(185) Dataclass(#STD_NUM)

Define_Com Class(#PRIM_LIST.Number) Name(#DropDown1Column1) Columnunits(Proportion) Columnwidth(1) Displayposition(1) Parent(#DropDown1) Sortonclick(True) Source(#STD_NUM)

Define_Com Class(#STD_NUM) Name(#STD_NUM)

Evtroutine Handling(#COM_OWNER.Initialize)
#STD_NUM := 1
Add_Entry To_List(#DropDown1)
#STD_NUM := 2
Add_Entry To_List(#DropDown1)
#STD_NUM := 3
Add_Entry To_List(#DropDown1)

* Set a value to the data class component of the #PRIM_LIST.DropDown
#STD_NUM := 99

Endroutine

End_Com

スクリーンショット 2024-02-22 093918.png
スクリーンショット 2024-02-22 093918.png (1.98 KiB) Viewed 15994 times

Thanks,
Taku
Post Reply