It is currently Sat Nov 25, 2017 3:01 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: ComboBox row/item height
PostPosted: Thu Jul 13, 2017 5:09 pm 
Offline
Always Here
Always Here

Joined: Fri Oct 23, 2009 2:33 am
Posts: 5688
Location: Wales, UK
Although you can define the height of the ComboBox gadget, this does not follow through to Item (Row) height.
Code:
ComboBoxGadget(#Combo, 5, 10, 380, 60)

On my bog-standard 96dpi screen, in the drop-down, the Item height is 28pix when using a regular 18pt font. More than adequate. Different story though on a high-res tablet! The Item height needs to be much greater so that people with chubby fingers like mine can make an accurate selection.

Is there a simple way to increase the Item height? At the moment, I'm looking at popping-up a tool window that contains a ListIcon instead, since there is a simple way to increase the Item height of a ListIcon:
Code:
iFlags.i = #PB_ListIcon_AlwaysShowSelection|#PB_ListIcon_FullRowSelect|#PB_ListIcon_GridLines|#LVS_NOSORTHEADER
iRowH.i = 60
ListIconGadget(#MyList, 5, 10, 380, 400, "Col 0", 380, iFlags)
SendMessage_(GadgetID(#MyList), #LVM_SETIMAGELIST, #LVSIL_SMALL, ImageList_Create_(1, iRowH, #ILC_COLORDDB, 0, 0))

Of course, increasing the Font Size makes a difference, but that is (a) ugly and (b) increases the width too much. Although I really don't need or want icons (#PB_ComboBox_Image), I tried the Items with 60pix high icons - Windows 7 shrinks them down to 14pix :(

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
Reply with quote  
 Post subject: Re: ComboBox row/item height
PostPosted: Thu Jul 13, 2017 5:25 pm 
Offline
PureBasic Bullfrog
PureBasic Bullfrog
User avatar

Joined: Wed Jul 06, 2005 5:42 am
Posts: 7954
Location: Kelowna, BC, Canada
Code:
 If OpenWindow(0, 0, 0, 270, 180, "ComboBoxGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)

   ComboBoxGadget(2, 10, 70, 250, 21)
   SendMessage_(GadgetID(2), #CB_SETITEMHEIGHT, 0, 30) ; <----------------------------------
      For a = 1 To 5
        AddGadgetItem(2, -1,"ComboBox item " + Str(a))
      Next

    SetGadgetState(2, 2)    ; set (beginning with 0) the third item as active one
   
    Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
  EndIf

_________________
Veni, vidi, vici.


Top
 Profile  
Reply with quote  
 Post subject: Re: ComboBox row/item height
PostPosted: Thu Jul 13, 2017 8:14 pm 
Offline
Always Here
Always Here

Joined: Fri Oct 23, 2009 2:33 am
Posts: 5688
Location: Wales, UK
netmaestro! living up to your exalted reputation once again, thanks for your help 8)

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye