It is currently Thu Nov 26, 2020 8:56 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: [Done] Editor Gadget and AddGadgetItme with -1 option
PostPosted: Thu Feb 25, 2016 11:44 pm 
Offline
User
User

Joined: Sun Oct 19, 2014 10:47 pm
Posts: 22
This is a cross-post from the Coding Forum. Others have checked this and found it works correctly under Linux and Windows, but is but is broken on OSX.

Last checked with PureBasic 5.42 Beta 4 LTS (MacOS X - x64) under OSX 10.9.5

Code:
If OpenWindow(0, 0, 0, 322, 150, "EditorGadget",
              #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
   EditorGadget(0, 8, 8, 306, 133)
   LoadFont(1, "Menlo", 13, #PB_Font_Bold)  ;; load the font
   SetGadgetFont(0, FontID(1))  ;; set the gadget font

   For a = 0 To 5
      AddGadgetItem(0, a, "Line "+Str(a))  ;; all good, uses loaded font
   Next

   For a = 0 To 5
      AddGadgetItem(0, -1, "Line "+Str(a))  ;; no font bolding, no font change
   Next

   Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf


It looks like new items added at the end don't get the font settings applied. If I add a further item with position, then the font settings will be applied to all items.

HTH .. m.


Top
 Profile  
Reply with quote  
 Post subject: Re: Editor Gadget and AddGadgetItme with -1 option
PostPosted: Sat Feb 29, 2020 10:39 am 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14179
Location: France
Seems to work great with current beta, can anybody else confirm ?


Top
 Profile  
Reply with quote  
 Post subject: Re: Editor Gadget and AddGadgetItme with -1 option
PostPosted: Sat Feb 29, 2020 11:13 am 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2730
Location: Germany
Its work :wink:

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


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