1. RAFAEL RODRIGUEZ
  2. PowerBuilder
  3. Tuesday, 25 July 2023 18:58 PM UTC

I need to change a combo box on a ribbon bar

I have this in XML:

<ComboBox PictureName="PageSizeSmall!" Label="" AllowEdit="true" AutoScale="false" Text="" AutoHScroll="false" Enabled="true" PowerTipText="Page Size" PowerTipDescription="Page size information." HScrollBar="false" VScrollBar="false" SelectedIndex="1" Sorted="true" Tag="Page size" BoxHeight="600" BoxWidth="300" Width="400" Visible="true" Modified="ue_ComboBoxPageSizeModified" Selected="ue_ComboBoxPageSizeSelected" SelectionChanged="ue_ComboBoxPageSizeSelectionChanged">
            <Item Text="A0" PictureName="PaperSizeA0Small!" />
            <Item Text="A1" PictureName="PaperSizeA1Small!" />
            <Item Text="A2" PictureName="PaperSizeA2Small!" />
            <Item Text="A3" PictureName="PaperSizeA3Small!" />
            <Item Text="A4" PictureName="PaperSizeA4Small!" />
          </ComboBox>
 

how can i do the same in powerscript?

 

 

Peter Pang @Appeon Accepted Answer Pending Moderation
  1. Thursday, 27 July 2023 06:11 AM UTC
  2. PowerBuilder
  3. # 1

Hi Rafael,

Integer li_Return
RibbonComboBoxItem lr_ComboBox

li_Return = lr_ComboBox.SetBoxPictureList("PaperSizeA0Small!,PaperSizeA1Small!,png\test.png")
li_Return = lr_ComboBox.AddItem("Item1",1)
li_Return = lr_ComboBox.AddItem("Item2",2)

Link: https://docs.appeon.com/pb2022/powerscript_reference/GetBoxPictureList_func.html

 

 

Best Regards,
Peter

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 26 July 2023 21:44 PM UTC
  2. PowerBuilder
  3. # 2

Hi, Rafael - 

Disclaimer: I have not used the RibbonBar. However, in looking through the Help and/or Online documentation, I've found the following info:

Have you tried using the InsertComboBox PowerScript function to add a combo box to a ribbonbar panel or group?

    https://docs.appeon.com/pb2022/powerscript_reference/InsertComboBox_func.html

Then it also looks likes from the documentation that you can add items to the RibbonComboBoxItem:

    https://docs.appeon.com/pb2022/powerscript_reference/additem_func.html#xREF_49629_Syntax_2

I hope this helps you find the solution to your question.

Best regards, John

Comment
There are no comments made yet.
luis avilan Accepted Answer Pending Moderation
  1. Tuesday, 25 July 2023 20:02 PM UTC
  2. PowerBuilder
  3. # 3

Hello rafael aui I leave you in example to see if it is useful and a link greetings

 

RibbonComboBoxItem lr_Combobox

rbb_1.getItemByTag( as_tag,lr_Combobox)

lr_ComboBox.text="A0"

lr_ComboBox.PictureName="PageSizeSmall!"
lr_ComboBox.AllowEdit=true
lr_ComboBox.AutoScale = false
lr_ComboBox.PowerTipText="Tamaño de página"
rbb_1.SetItem( lr_ComboBox )

 

Control RibbonComboBoxItem: objetos y controles (appeon.com)

Comment
  1. RAFAEL RODRIGUEZ
  2. Tuesday, 25 July 2023 21:06 PM UTC


I need to create a combobox with multiple items and display as a picture list box from powerscript in the ribbonbar



I need it for a dinamic list

  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.